UtterAccess.com
X   Site Message
(Message will auto close in 2 seconds)

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> View characters that do not fit in a ListBox    
 
   
jpgalasso
post Apr 14 2009, 05:25 PM
Post #1

UtterAccess Enthusiast
Posts: 89



I have a ListBox that may not be wide enough to display all of the characters for some of the items in the ListBox. Is there a ListBox property that permits the User to click on an item to view all the characters for the item when the ListBox is not wide enough to show all the characters?

Thank you for any help.

Jim
Go to the top of the page
 
+
pere_de_chipstic...
post Apr 14 2009, 06:13 PM
Post #2

UtterAccess VIP
Posts: 7,590
From: South coast, England



Hi Jim

I have used:
MsgBox Me![ListBoxName].Column(1)

To display the visible column (the second column in this case) of a listbox in a message box.

This could go in either the List Boxes Double click event or on a separate command button.

HTH
Go to the top of the page
 
+
jpgalasso
post Apr 14 2009, 06:44 PM
Post #3

UtterAccess Enthusiast
Posts: 89



Thank you but I was trying to let the User view the name on the Form (i.e. the ListBox) itself. Is that possible?

Thanks again for your help.

Jim
Go to the top of the page
 
+
pere_de_chipstic...
post Apr 14 2009, 07:17 PM
Post #4

UtterAccess VIP
Posts: 7,590
From: South coast, England



Hi Jim

I don't think you can directly view the complete contents of the visible column of a list box if the text is wider than the width of the list box itself, short of amending the list box and column widths, temporarily, in code; but this could look pretty messy and I wouldn't recommend it.

An alternative might be to add an unbound text box on the form
1. Name = ListBoxData
2. Enabled = No
3. Locked = Yes
4. Back Style = Transparent

and in the List box After_Update (or On_Click) event put

Me.ListBoxData = Me![ListBoxName].Column(1)

HTH
Go to the top of the page
 
+
jpgalasso
post Apr 14 2009, 07:34 PM
Post #5

UtterAccess Enthusiast
Posts: 89



Thank you very much, Bernie.

I went with your first suggestion and included a MsgBox when the User clicks an item in the ListBox that lets him either continue with the rest of the macro for the selected item or exit the sub.

Thanks much again.

Jim
Go to the top of the page
 
+
pere_de_chipstic...
post Apr 14 2009, 08:28 PM
Post #6

UtterAccess VIP
Posts: 7,590
From: South coast, England



You're welcome (IMG:http://www.utteraccess.com/forum/style_emoticons/default/thumbup.gif)

Good luck with your project.
Go to the top of the page
 
+

Thank you for your support! Reply to this topicStart new topic

Jump To Forum:
 



RSS Go to Top  ·  Lo-Fi Version Time is now: 23rd May 2013 - 08:23 AM