简体   繁体   中英

tktable text garbled when width of cells is too narrow

using Tktable 2.11 with tk 8.6.9 on Mojave. when I make a simple table

table .t -variable var -rows 4 -cols 2
pack .t

if I enter enough text that it doesn't fit, it will appear garbled, sometimes even part of the text showing up in a distant cell. Of course, it is fixed when I resize but I would like it to be cut off. (in fact I think that is what the -ellipsis is to do, but that doesn't seem to have an affect. Besides sometimes I need to have -wrap or -multiline, which don't work with -ellipsis)

Contrast this with the entry widget, which clearly displays partial text when the entire text does not fit

entry .e -width 5
.e insert end "123456789"
pack .e

In an older version of Tktable that I was using, I did not have this problem.

This was answered in comp.lang.tcl:

This is a known issue when using Tktable under Cocoa-based Tk Aqua, and has been for several years now. See https://sourceforge.net/p/tktable/bugs/309/

So far the suggested workaround is to use -drawmode slow.

This worked for the text that doesn't fit. Unfortunately, I see it makes all of the text a bit fuzzy - even in cells where the text was fully displayed.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM