#18 ScrolledText Row Header Synchronisation

closed-out-of-date
nobody
None
5
2012-07-12
2003-09-01
Dave Moor
No

I'm using the ScrolledText widget to display some rows
of DNA code. My program has an option to display in
uppercase or lowercase. When the user changes case I
execute the following peice of code:

if (self._useUppercase):
self._sequence.setvalue(
string.upper(self._sequence.getvalue()))
else:
self._sequence.setvalue(
string.lower(self._sequence.getvalue()))

When I do this I see strange 'auto' scrolling behaviour
which I have only seen before when I had a different
number of row in the rowheader widget to the text
widget. As I am not changing the length of the contents
just the case I'm not sure how they can be getting out
of sync?

Below is the widget creation code:

self._sequence = Pmw.ScrolledText(frame,
labelpos = 'nw',
label_text = 'DNA Sequence:',
# borderframe = 1,
columnheader = 1,
rowheader = 1,
rowcolumnheader = 1,
usehullsize = 1,
hull_width = 680,
hull_height = 400,
text_wrap='none',
text_font = fixedFont,
Header_font = fixedFont,
Header_foreground = 'blue',
rowheader_width = 6,
rowcolumnheader_width = 6,
text_padx = 4,
text_pady = 4,
Header_padx = 4,
rowheader_pady = 4,
)

Discussion

  • Adrian
    Adrian
    2012-07-12

    • status: open --> closed-out-of-date