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 derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Adding a Horizontal Scrollbar to a Listbox

Status
Not open for further replies.

dftjsn

Programmer
Feb 25, 2002
43
US
Listboxes and comboboxes do not have built-in support (i.e. a horizontal scrollbar) for displaying text strings that exceed the visible area of the listbox or combobox. I have a series of long strings that I'd like to display in a listbox and allow the user to scroll to see the entire string/record. According to MSDN, you can add a horizontal scrollbar to a listbox in VisualBasic using the GetWindowLong, SetWindowLong, and SendMessage API calls and some coding to determine the length of your longest string to be displayed. Unfortunately, I don't think this works in Access VBA due to the differences in controls between VB and Access. Has anyone successfully added a horizontal scrollbar to a listbox in Access to allow scrolling through a single column that contains long strings that don't fit the screen?
 
I've never found a way to add a scrollbar, but I did find a way to enlarge the column width and list width in a combobox. In Properties, of course. Sounds like that wouldn't be good enough, though. Just one thing.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top