Comments (8)
It doesn't support wrapping as such. I think the truncation is done in the drawText method https://github.com/dmnfarrell/tkintertable/blob/master/tkintertable/Tables.py
I don't actively make updates to this library but if you can change it in a way that doesn't break normal behaviour I would be glad to integrate the code.
from tkintertable.
Here's line 1634 [in drawText()]:
celltxt = celltxt[0:int(math.floor(newlength))]
There should be no trouble partitioning around newlines, but the height of the cell will now have to be considered. I haven't used tkintertable long enough -- is there only one row height for the whole table? If so, then either all rows might be height-increased; or the font size can be decreased; or the text is truncated but not until the height is filled. I suspect the first two are non-starters.
While not optimal for me, if the text can be extended that would be better than nothing. (BTW, I'm not suggesting an automatic wrap - the user would have to provide embedded newlines in the text to create multiple lines in the cell.)
Are you OK with any of those options?
from tkintertable.
Yes there is a single global row height and font size. These can be changed in the prefs dialog.
The text length is meant to be truncated to fit the column but seems isn't accurately calculated anyway. A proper wrap would be best rather than a hack based on newlines but I realise it would take time to implement. Any solution that doesn't break the normal behaviour is ok. You might be better off subclassing the table and implementing your own drawText that doesn't truncate.
Note that I implemented wrapping in pandastable but just for the column header ( http://dmnfarrell.github.io/dataexplore/2018/06/21/newrelease-0.10). So the code in there might be of use also. see https://github.com/dmnfarrell/pandastable/blob/master/pandastable/headers.py
from tkintertable.
I download last version, but i have seems problem:
Did you can help fix it?
from tkintertable.
The table can't deal with non ascii characters very well. You are using cyrilic? I'll have to see how easy it is to fix.
from tkintertable.
it is unicode encoding, but yes, it is cyrillic.
or maybe its cp1251 -Widows Cyrillic
i have some other question about tkintertable, if you can help - it was amazing!
my e-mail is [email protected]
from tkintertable.
I'm attempting to get long text to appear in a cell. From the data file:
The text has embedded newlines (0x0a) which appear to work,
and the data appears to be going into the model correctly,
but (as seen in the second and third images) the displayed info is being truncated. Is there anything that can be done with that?
I need to get values truncated otherwise it looks really bad for my purposes how did you make that happen?
from tkintertable.
The text length is meant to be truncated to fit the column but seems isn't accurately calculated anyway.
I think you know my problem ... what should be the solution to make this calculation more accurate?
from tkintertable.
Related Issues (20)
- cell binding HOT 7
- GPL or copyright? HOT 1
- How to autoResizeColumns correctly HOT 2
- Solved: Is it possible to make readonly just a single column ?
- rowspan and colspan HOT 1
- Values on table overlapping (Visual overlapping) HOT 1
- Draw Text does not work. HOT 1
- importCSV doesnt work HOT 2
- sys is not defined HOT 6
- isLink function in Tables.py logic issue HOT 2
- No Way to add several columns at ones HOT 1
- Left clicking bug
- Bug in `TableModel.deleteColumns()`
- Omit filter term in model.getColumnData
- Freezepane HOT 1
- Question on Data type HOT 1
- No Option to Insert Images Into TkinterTable? HOT 2
- Usage doc problem
- ListType outdated
- Output: "Did not find preferences!!!" HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from tkintertable.