|
-
Mar 27th, 2009, 05:30 PM
#1
Thread Starter
New Member
Help with Trackbar in VB 2008
Hi im new to this so please bere with me.
Im trying to get a trackbar to work so that when it slides if enables the visible setting of some list boxes and lables etc.
When trackbar = 5, listboxes 1-5 are displayed, lables 1-5 are displayed and buttons 1-5 are displayed but 6-8 are all hidden.
Similally when trackbar = 2, listboxes 1 and 2 are displayed, lables 1 and 2 are displayed and buttons 1 and 2 are displayed but 3-8 are all hidden.
Ive got it to work but only after 200 odd lines of code with loads of if statements and to be honest im sure it can be done in a better way.
If anyone can help I would really appreciate it.
Bellow is some of what I have currently got.
If trackbarvalue = 8 Then
lstIsle8.Visible = True
lblShelf8.Visible = True
btnAddShelf8.Visible = True
btnAddList8.Visible = True
lstIsle7.Visible = True
lblShelf7.Visible = True
btnAddShelf7.Visible = True
btnAddList7.Visible = True
etc etc.
Thanks very much in anticipation
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|