Results 1 to 14 of 14

Thread: Scrollbar

  1. #1

    Thread Starter
    New Member Uee's Avatar
    Join Date
    Oct 2001
    Location
    Australia
    Posts
    8

    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.

  2. #2
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333
    What do you mean by "customize or skin a listbox scrollbar"?

  3. #3
    Frenzied Member MrGTI's Avatar
    Join Date
    Oct 2000
    Location
    Ontario, Canada
    Posts
    1,277

    Question

    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


  4. #4

    Thread Starter
    New Member Uee's Avatar
    Join Date
    Oct 2001
    Location
    Australia
    Posts
    8
    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.

  5. #5
    Frenzied Member MrGTI's Avatar
    Join Date
    Oct 2000
    Location
    Ontario, Canada
    Posts
    1,277

    Question

    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


  6. #6
    Fanatic Member daydee's Avatar
    Join Date
    Jun 2001
    Location
    Canada
    Posts
    560
    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!
    Give your music collection a whole new life with PartyTime Jukebox

  7. #7
    Fanatic Member laserman's Avatar
    Join Date
    Jan 2002
    Location
    Wales U.K
    Posts
    775
    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:
    1. Private Sub Form_Load()
    2. List1.AddItem "test1"
    3. List1.AddItem "test2"
    4. List1.AddItem "test3"
    5. List1.AddItem "test4"
    6. List1.AddItem "test5"
    7. List1.AddItem "test6"
    8. End Sub
    9.  
    10. Private Sub HScroll1_Change()
    11. List1.ListIndex = HScroll1.Value
    12.  
    13. End sub
    14.  
    15. Private Sub HScroll1_Scroll()
    16. List1.ListIndex = HScroll1.Value
    17.  
    18.  
    19.  
    20.  
    21.  
    22. End Sub
    Last edited by laserman; Feb 22nd, 2004 at 02:34 PM.

  8. #8
    Fanatic Member laserman's Avatar
    Join Date
    Jan 2002
    Location
    Wales U.K
    Posts
    775
    Examples using buttons ,Timer And Hscroll control

    Hope this helps you

    Cheers
    Attached Files Attached Files

  9. #9
    Fanatic Member daydee's Avatar
    Join Date
    Jun 2001
    Location
    Canada
    Posts
    560
    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!
    Give your music collection a whole new life with PartyTime Jukebox

  10. #10
    Fanatic Member daydee's Avatar
    Join Date
    Jun 2001
    Location
    Canada
    Posts
    560

    Thumbs up

    Just found this reply by Aaron Young in another thread.
    Exactly what I was looking for.

    http://www.vbforums.com/showthread.php?s=&threadid=6952
    Give your music collection a whole new life with PartyTime Jukebox

  11. #11
    Fanatic Member laserman's Avatar
    Join Date
    Jan 2002
    Location
    Wales U.K
    Posts
    775
    Edit your first post with [Resolved] in the title.

    Cheers

  12. #12
    Fanatic Member daydee's Avatar
    Join Date
    Jun 2001
    Location
    Canada
    Posts
    560
    I would if I could...

    I didn’t start it
    Give your music collection a whole new life with PartyTime Jukebox

  13. #13
    Fanatic Member laserman's Avatar
    Join Date
    Jan 2002
    Location
    Wales U.K
    Posts
    775
    Daydee.

    My Appologies

    Cheers

  14. #14
    Fanatic Member daydee's Avatar
    Join Date
    Jun 2001
    Location
    Canada
    Posts
    560
    np
    Give your music collection a whole new life with PartyTime Jukebox

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width