hoffstadt / hoffstadt/DearPyGui

Multiline text overflows a table cell/row vertically

Open
#1,894 1 comment 0 reactions 0 assignees View on GitHub
state: pending type: bug
Dominant language
C++
Stars
15.6k
Forks
783
PR merge metrics
No merged PRs in 30d

Description

## Version of Dear PyGui

- version: 1.7.1
- operating system:
+ Mac OS 12.6 (Intel-based), Python 3.9.14
+ Windows 10 21H1, Python 3.10.5

## My issue

When a table has `clipper` and `borders_outer*` properties set to `True`, then a multiline text content vertically "overflows" the cell/row. Moreover, in long tables it prevents those tables from scrolling beyond the problematic row.

## To reproduce

Steps to reproduce the behavior:

1. Create a `dpg.table` object with `clipper` and `borders_outer*` properties set to `True`
2. Set one of the cells content to a text content with many lines of text
3. The cell content "overflows" or "goes out" of the cells borders vertically

## Expected behavior

The cell and its borders are sized to the text content.

## Screenshot

cell-overflown

## Standalone, minimal, complete and verifiable example

``` py
import dearpygui.dearpygui as dpg

dpg.create_context()

addHorizontalScroll = False
with dpg.window(label="Table", width=1000, height=500):
columnsCount = 3
rowCount = 4
with dpg.table(
borders_outerH=True,
borders_innerV=True,
borders_innerH=True,
borders_outerV=True,
clipper=True
):
for i in range(columnsCount):
dpg.add_table_column()
for i in range(rowCount):
with dpg.table_row():
for j in range(columnsCount):
if i == 1 and j == 1:
dpg.add_text(
"""
some multiline text some multiline text some multiline text
some multiline text some multiline text some multiline text
some multiline text some multiline text some multiline text
some multiline text some multiline text some multiline text
some multiline text some multiline text some multiline text
some multiline text some multiline text some multiline text
some multiline text some multiline text some multiline text
"""
)
else:
dpg.add_text(f"{i}-{j}")

dpg.create_viewport(title="Some", width=1200, height=600)
dpg.setup_dearpygui()
dpg.show_viewport()
dpg.start_dearpygui()
dpg.destroy_context()
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.