Source language: Translate to:

Scroll Bar(s) sycronization

NeoBook tips, tricks, code samples and more...

Moderator: Neosoft Support

Scroll Bar(s) sycronization

Postby dbz » Fri May 06, 2005 11:41 am

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
User avatar
dbz
 
Posts: 42
Joined: Mon Apr 04, 2005 4:12 am
Location: Varel, Germany

Postby Sam Cox » Fri May 06, 2005 11:53 am

The discussion in this link might interest you.

http://www.software-zone.com/neosoft/in ... 70c1511a4b
User avatar
Sam Cox
 
Posts: 768
Joined: Fri Apr 01, 2005 7:30 am
Location: Loveland CO USA

Listbox Syncronization

Postby dbz » Fri May 06, 2005 12:51 pm

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.
User avatar
dbz
 
Posts: 42
Joined: Mon Apr 04, 2005 4:12 am
Location: Varel, Germany


Return to NeoBook Knowledgebase

Who is online

Users browsing this forum: No registered users and 0 guests

cron