Adding Scrollbars at runtime

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Cheeese
    New Member
    • Jan 2007
    • 5

    #1

    Adding Scrollbars at runtime

    Hello All,
    I am using a list box to display the results of a search query in VB6. The problem is, though the vertical scroll bars appear automatically when there are more results, there is no horizontal scroll bar to view long texts. Any solution for this problem?

    Thank you
  • Killer42
    Recognized Expert Expert
    • Oct 2006
    • 8429

    #2
    Originally posted by Cheeese
    I am using a list box to display the results of a search query in VB6. The problem is, though the vertical scroll bars appear automatically when there are more results, there is no horizontal scroll bar to view long texts. Any solution for this problem?
    Perhaps you could find a way to use a textbox control (with .Locked = True) to simulate your listbox?

    Comment

    • Cheeese
      New Member
      • Jan 2007
      • 5

      #3
      Hello,

      The solution did not work!

      Comment

      • Killer42
        Recognized Expert Expert
        • Oct 2006
        • 8429

        #4
        Originally posted by Cheeese
        The solution did not work!
        Hm... ok, what about this? (I'm just throwing out ideas as they occur to me - don't know how well it will work).

        You might be able to place a really wide listbox inside a picturebox. Put a horizontal scroll bar on the picturebox, and use that to move left and right. If you do it right, it should look as though you are scrolling the listbox.

        This is just off the top of my head, of course. Have a play around, see what you can come up with.

        Comment

        • Killer42
          Recognized Expert Expert
          • Oct 2006
          • 8429

          #5
          Ahah! Here are a couple of links which provide an answer to your question, without having to play around with other controls.For more info, try searching Google for something like "vb horizontal scroll listbox".

          Comment

          Working...