dmnfarrell / pandastable

Table analysis in Tkinter using pandas DataFrames.
Other
617 stars 127 forks source link

limiting cell line number to 1 per default #222

Closed bigoulours closed 2 years ago

bigoulours commented 2 years ago

It seems you planed to add text wrapping but the warp variable isn't used and cell height isn't set either. Since multi-line cells lead to messed up display, I suggest setting cells as single line until a better solution is developed. This doesn't affect the underlying df and editing via double click is still be possible.

dmnfarrell commented 2 years ago

Single line change is fine but why is the fgcolor parameter being removed from the drawtext function here?

bigoulours commented 2 years ago

If I'm not mistaken the only time you set fgcolor actively is with value self.textcolor. Why not hardcoding it directly? Am I missing something? This should also work with different themes.

bigoulours commented 2 years ago

If you wish to keep fgcolor I'll gladly revert my changes to only keep single_line=True and:

if single_line:
    celltxt = celltxt.strip().split('\n', 1)[0]
dmnfarrell commented 2 years ago

Having it as a parameter allows the function to be re-used elsewhere with other colors but it isn't at the moment so doesn't probably matter.