Message382901
The position of the caret assumes that every character in the string takes up the same width, measured in pixels. That is only true for monospaced fonts like Courier.
The only way to position the caret precisely with a proportional-width font is to compute the number of pixels for each character and then line up the caret at a position based on pixels rather than character columns. Unless Tkinter has functions to do both, it will probably be complicated and expensive, and I doubt anyone would care enough to do it. |
|
Date |
User |
Action |
Args |
2020-12-12 03:23:57 | steven.daprano | set | recipients:
+ steven.daprano, terry.reedy |
2020-12-12 03:23:57 | steven.daprano | set | messageid: <1607743437.49.0.436417934565.issue42623@roundup.psfhosted.org> |
2020-12-12 03:23:57 | steven.daprano | link | issue42623 messages |
2020-12-12 03:23:57 | steven.daprano | create | |
|