Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Horizontal Scroll Bars List Box 1

Status
Not open for further replies.

rdharmar

IS-IT--Management
Jun 20, 2001
54
US
I want horizontal Scroll bars in my list box having just one column. I do not have space to make it wider and so I would like to view the data by scrolling it horizontally. Is there a way out? Thanks in advance.
 
try using an Hscroll control...eg.

Private Sub HScroll1_Scroll()
Dim word1 As String
word1 = "supercalafragalisticespialadocios"
word2 = "bla bla bla"

If HScroll1.Value = 0 Then
List1.List(0) = word1
End If
HScroll1.Max = Len(word1)
List1.List(0) = Right(word1, Len(word1) - HScroll1.Value)
End Sub

Hope that gives you a start ;) Rob
"Programming is like art...It makes me feel like chopping my ear off."
 
There is an API call to do this as well, check out the following MSDN article:

HOWTO: Add a Horizontal Scroll Bar to a Visual Basic ListBox

Q192184


cheers,

Madlarry
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top