how to get the maximum line of stc?
I want to use it in this code :
self.SetScrollbar(wx.VERTICAL, 0, 0, stcMaxline)
self.SetScrollbar(wx.HORIZONTAL, 0, 6, (?)) <-- this is my
concern!
for example, there is a text like this :
···
--------------------------
abcd
abcdefg
a
--------------------------
and I would like to get the count of 'abcdefg'
Wonjun, Choi
maxlen = 0
for lineno in range(0,stc.GetLineCount()):
line = stc.GetLine(lineno)
maxlen = max(maxlen, line.Len())
should do the trick!
Gadget/Steve
···
On 14/10/2011 9:57 AM, Wonjun, Choi wrote:
how to get the maximum line of stc?
I want to use it in this code :
self.SetScrollbar(wx.VERTICAL, 0, 0, stcMaxline)
self.SetScrollbar(wx.HORIZONTAL, 0, 6, (?)) <-- this is my
concern!
for example, there is a text like this :
--------------------------
abcd
abcdefg
a
--------------------------
and I would like to get the count of 'abcdefg'
Wonjun, Choi