Page 1 of 1

Scroll Bar(s) sycronization

PostPosted: Fri May 06, 2005 11:41 am
by dbz
a little help please. i am lost...listboxes and scroll bars. :?:

i have 2 listboxes that i have to keep in sync (i used two instead of making the item for one include both values - because i didn't want to get involved with spacing. was easier to use a second listbox to provide the appearance of columns.
these two listboxes will always have enough items to force scroll bars (255 to be exact).

Since i could not figure out how to get at the scroll bar, i cheated: I knew the maximum number of items the listbox could contain w/o forcing scroll bars (MAX). so, i ate compute time by putting a trackbar between the listboxes and used the trackbar event to change the content of the items in the listboxes, always maintaining the MAX. When the users selects one, I hi-jack the mouse for a couple of ms to cause the appearance of a auto 'select' in the other.

Sure would be a lot easier when there are scroll bars if i knew how to obtain the occurance number of the item displayed at the top and/or Bottom , and how to cause an item to be displayed at the top.

thx dbz

PostPosted: Fri May 06, 2005 11:53 am
by Sam Cox
The discussion in this link might interest you.

http://www.software-zone.com/neosoft/in ... 70c1511a4b

Listbox Syncronization

PostPosted: Fri May 06, 2005 12:51 pm
by dbz
thank you sir. smooth puffen and have a good weekend.

dbz

I did research, but i was looking for scroll bars. will research more 'fexibly' in the future.