Giter Club home page Giter Club logo

Comments (8)

dmnfarrell avatar dmnfarrell commented on June 11, 2024

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.

Meandmore avatar Meandmore commented on June 11, 2024

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.

dmnfarrell avatar dmnfarrell commented on June 11, 2024

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.

alex-pancho avatar alex-pancho commented on June 11, 2024

I download last version, but i have seems problem:
screen
Did you can help fix it?

from tkintertable.

dmnfarrell avatar dmnfarrell commented on June 11, 2024

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.

alex-pancho avatar alex-pancho commented on June 11, 2024

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.

MRES1 avatar MRES1 commented on June 11, 2024

I'm attempting to get long text to appear in a cell. From the data file:

capture1

The text has embedded newlines (0x0a) which appear to work,

capture2

and the data appears to be going into the model correctly,

capture2

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?

image

from tkintertable.

MRES1 avatar MRES1 commented on June 11, 2024

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?
image

from tkintertable.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.