简体   繁体   中英

Get the length in characters of a PyGTK TextView

我在最大化的窗口中有一个gtk TextView,我想知道在滚动之前一行可以容纳多少个字符。

(Friendly reminder, please stop putting answers in the comments, people.)

To summarize:

It depends on the size of the TextView, size of the window, size of the font, and as Alex Martelli said, the particular font and the usage of letters..."i" is a narrow letter, "m" is a wide letter, thus you can fit more "i"s than you can "m"s in a given space.

So, in short, there is no way to know for sure.

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