Results 1 to 14 of 14
  1. #1
    selvakumar.arc is offline Advanced Beginner
    Windows 7 64bit Access 2010 32bit
    Join Date
    Apr 2013
    Posts
    49

    How to apply Horizontal scroll bar to List Box control

    How to bring horizontal scrollbar to List Box control? My list item data width is more the size of list box control, so the data is truncating. How I will bring horizontal scrollbar in List Box control?

    Increasing list box size is not matching for my requirement because size is fixed and it should not be changed.



    Regards,
    Selvakumar R

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,930
    You have only 1 column in the listbox?

    I could get the horizontal scrollbar to activate only if I set the listbox ColumnCount to 2 and ColumnWidths to multiple values, like: 1";1"
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    Missinglinq's Avatar
    Missinglinq is offline VIP
    Windows 7 64bit Access 2007
    Join Date
    May 2012
    Location
    Richmond (Virginia, not North Yorkshire!)
    Posts
    3,018
    I can only get a Horizontal Scroll Bar when there are two or more Columns and the Total of the Widths of all Columns must exceed the Width of the Listbox, itself[/B]. And then, if using two columns, it only wants to be all the way left, showing the first column, or all the way right , showing the second column. If the width of the Listbox cannot be increased, I'm not sure that you're going to be able to resolve this.

    Linq ;0)>
    The problem with making anything foolproof...is that fools are so darn ingenious!

    All posts/responses based on Access 2003/2007

  4. #4
    selvakumar.arc is offline Advanced Beginner
    Windows 7 64bit Access 2010 32bit
    Join Date
    Apr 2013
    Posts
    49
    I have two columns in the List Box and it is like key value pair. First column contain text value (text length is more the size of list box control width) and second column contain unique id. And I am displaying only text field in the control. But this text value is truncating in the control. Any solution to show the complete text in control without changing width of list box?
    I tried 1st solution but it displaying 2 column in the list box and still truncating text value.

  5. #5
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,930
    Combo and list boxes do not allow line 'wrapping'. The data will truncate if the column is not wide enough to display. As Linq says, total of column widths must exceed the listbox width. Is this the case for your box?
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  6. #6
    selvakumar.arc is offline Advanced Beginner
    Windows 7 64bit Access 2010 32bit
    Join Date
    Apr 2013
    Posts
    49
    Yes my column width is more than the width of Listbox. So that user is unable to see whole word in the control. For example I have column "TextValue" for list box and its value is "Welcome to MS Access". But list box width is small so it is showing only "Welcome to" and remaining words are truncating/not displaying. I want to see full text without increasing size of the listbox control, basically I am expecting to show horizontal scroll bar to see complete text in the control.

  7. #7
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,930
    In my test, as long as the single column width is wider than length of text, it fully displays, otherwise it truncates.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  8. #8
    selvakumar.arc is offline Advanced Beginner
    Windows 7 64bit Access 2010 32bit
    Join Date
    Apr 2013
    Posts
    49
    Is it possible to increase column width so that I can see whole text? Horizontal scrollbar is acceptable as per my requirement but I should not increase listbox size.

  9. #9
    pradeep.sands is offline Advanced Beginner
    Windows 7 32bit Access 2010 32bit
    Join Date
    Jun 2013
    Posts
    49
    go for 'autoexpand' option

  10. #10
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,930
    Use ColumnWidths property to set the width of each column.


    pradeep, listbox does not have 'autoexpand' and the property does not apply to this issue anyway
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  11. #11
    Missinglinq's Avatar
    Missinglinq is offline VIP
    Windows 7 64bit Access 2007
    Join Date
    May 2012
    Location
    Richmond (Virginia, not North Yorkshire!)
    Posts
    3,018
    Also, AutoExpand doesn't do what it name infers; in a Combobox it moves to the first selection that matches what is being typed into the Combobox.

    Linq ;0)>
    The problem with making anything foolproof...is that fools are so darn ingenious!

    All posts/responses based on Access 2003/2007

  12. #12
    selvakumar.arc is offline Advanced Beginner
    Windows 7 64bit Access 2010 32bit
    Join Date
    Apr 2013
    Posts
    49
    Column width property also not working for me. Please find the property assigned for the listbox control and please correct me if I am wrong.
    Row Source Type - Table/Query
    Row Source - Select TextValue, Id from TestTable;
    Column Count - 1
    Column Heads - No
    Column Width - 3";
    Bound Column - 1

    Still data is truncating in Listbox control...

  13. #13
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,930
    Okay, finally replicated the issue. I originally checked this with existing 6-column listbox in my db and the last column a date value (listbox treats as text). Just created a new listbox with columns from text fields and it does not offer any blank space after the last column for the scrollbar to travel through, even though the column width is far greater than needed for the text content. Sorry, don't know why my first tests worked and this one fails.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  14. #14
    selvakumar.arc is offline Advanced Beginner
    Windows 7 64bit Access 2010 32bit
    Join Date
    Apr 2013
    Posts
    49
    Hi All,
    Thanks for your support, if there is any solution for this issue please update. I appreciate your support.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 2
    Last Post: 02-25-2013, 10:47 AM
  2. Hide List Box Scroll Bar on Field in Rept
    By cmwpcol in forum Reports
    Replies: 1
    Last Post: 01-10-2013, 06:09 PM
  3. code to apply control formatting
    By tariq1 in forum Programming
    Replies: 3
    Last Post: 07-21-2012, 12:36 PM
  4. Replies: 5
    Last Post: 04-20-2012, 10:07 AM
  5. Control of horizontal scroll bar
    By smthomer in forum Programming
    Replies: 3
    Last Post: 08-25-2010, 10:52 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums