just wondering how i can customize or skin a listbox scrollbar
one thought i had was to use an api to hide the scrollbar and then use a hscrollbar object but i still need to know how to set that up to make the listbox scroll
Thanx in advance ue.
Printable View
just wondering how i can customize or skin a listbox scrollbar
one thought i had was to use an api to hide the scrollbar and then use a hscrollbar object but i still need to know how to set that up to make the listbox scroll
Thanx in advance ue.
What do you mean by "customize or skin a listbox scrollbar"?
If you just wanted to display data and not have the user interact with the contents, then you could always use a Web Browser control.
Otherwise you might need to buy a 3rd party control.
i didnt explain myself properly i just ask the simple way.
is there anyway to make my listbox scroll without using the built in scrollbar ?
so i want to use another object to make the list scroll up and down be it buttons or a seperate vsrollbar object.
oooooooooh. Good question.
I think it could be done, although at this moment i'm at a loss. I can't think of how you could have a listbox without a scroll bar.
Interesting ...........
I know this is an old thread but I would also like to know if any one can come up with a solution for this. :(
Thanks!
:)
like this
1. Add the listbox
2. add a hscroll control
3. set the max of the scroll bar too the number of items in a list
eg 6 in this case
VB Code:
Private Sub Form_Load() List1.AddItem "test1" List1.AddItem "test2" List1.AddItem "test3" List1.AddItem "test4" List1.AddItem "test5" List1.AddItem "test6" End Sub Private Sub HScroll1_Change() List1.ListIndex = HScroll1.Value End sub Private Sub HScroll1_Scroll() List1.ListIndex = HScroll1.Value End Sub
Examples using buttons ,Timer And Hscroll control
Hope this helps you
Cheers
Thanks laserman, just tried your sample out.
My goal for now is to display an up and down button to automatically replace the listbox's scrollbar whenever it would appear.
I'm using GetSystemMetrics API to auto adjust the width of the buttons to scrollbar's width.
If I can just figure out a way to determine exactly when the scrollbar becomes visible, I'll be set. :)
Problem is... the font size for the listbox can be changed at will by the user, so this is what I'm working on right now.
Thanks again!
Just found this reply by Aaron Young in another thread.
Exactly what I was looking for. :D
http://www.vbforums.com/showthread.php?s=&threadid=6952
Edit your first post with [Resolved] in the title.
Cheers
I would if I could...
I didn’t start it :lol:
Daydee.
My Appologies
Cheers
np :)