How to move scrollbar by code?

M

Muddy Coder

Hi Folks,

I am trying to make a listbox that will contain a looong data list,
sorted, so I will be able to pre-select a data line by coding. I have
done it. Say my listbox contains 1000 data lines, and my program has
figured out the data line 321 is needed, so just put the cursor on
data line 321. However, my scrollbar is still seating on the top, so I
just can view the data line from line 0 to 30 or 40, since I can't see
the desired data line 321. I still need to manually pull the
scrollbar down to display the data line 321. What I want to do is to
grab the adjacent data lines, say from line 300 to 340, and display
this lines, while my cursor seating in the middle. I consulted the
Python Docs, but did not find such details. Can somebody give an idea?
Thanks!


Cosmo
 
C

Chris Angelico

I am trying to make a listbox that will contain a looong data list,
sorted, so I will be able to pre-select a data line by coding. I have
done it.

Which GUI toolkit are you using? What you want is not the Python
language docs, but the docs for that toolkit (GTK, Qt, Tk, etc).


ChrisA
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,982
Messages
2,570,190
Members
46,740
Latest member
AdolphBig6

Latest Threads

Top