Oct 1st, 2001, 01:07 PM
#1
Thread Starter
New Member
Scrollbar
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.
Oct 1st, 2001, 01:36 PM
#2
What do you mean by "customize or skin a listbox scrollbar"?
Oct 1st, 2001, 02:08 PM
#3
Frenzied Member
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.
~Peter
Oct 1st, 2001, 11:12 PM
#4
Thread Starter
New Member
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.
Oct 2nd, 2001, 12:13 PM
#5
Frenzied Member
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 ...........
~Peter
Feb 22nd, 2004, 08:32 AM
#6
Feb 22nd, 2004, 01:45 PM
#7
Fanatic Member
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
Last edited by laserman; Feb 22nd, 2004 at 02:34 PM .
Feb 22nd, 2004, 06:58 PM
#8
Fanatic Member
Examples using buttons ,Timer And Hscroll control
Hope this helps you
Cheers
Attached Files
Feb 22nd, 2004, 11:13 PM
#9
Fanatic Member
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!
Feb 23rd, 2004, 12:55 AM
#10
Feb 23rd, 2004, 11:05 AM
#11
Fanatic Member
Edit your first post with [Resolved] in the title.
Cheers
Feb 23rd, 2004, 07:40 PM
#12
Fanatic Member
I would if I could...
I didn’t start it
Feb 23rd, 2004, 07:45 PM
#13
Fanatic Member
Daydee.
My Appologies
Cheers
Feb 24th, 2004, 12:24 AM
#14
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