Wednesday, December 1, 2004
From the Edge: ComboBox vs. ListBox - What's the Difference? Section: Form Database Controls Chapter: Running R:BASE Your Way! Platform: R:BASE 7.x/8.x for Windows Build: 7.1.78.31123 and higher
R:BASE 7.x/8.x for Windows offers the following Database ComboBox and ListBox Controls:
. DB Lookup ComboBox . DB User Defined ComboBox . DB Lookup ListBox . DB User Defined ListBox
So, what's the difference? Why would you use one instead of the other?
In general, it's all about the available real estate on your form, as well as the look and feel of your R:BASE 7.x/8.x applications.
The ComboBox and ListBox controls have similar behaviors, and in some cases may be interchangeable. There are times, however, when one or the other is more appropriate for a task. The ComboBox control is used to display data in a drop-down ComboBox. When selected, the ComboBox control opens, displaying a list of items from which you can choose.
Generally, a ComboBox is appropriate when there is a list of suggested choices, and a ListBox is appropriate when you want to limit input to what is on the list. The selection height of the ListBox determines how many list items can be selected at a time. For a ComboBox, you may also limit the items by using the Drop-Down Count option.
A ComboBox contains a text box field, so choices not on the list can be typed in. The exception is when the WALKMENU property is set to 'ON'. In that case, the control will select an item if you type its first letter. In addition, ComboBoxes save space on a form. Because the full list is not displayed until the user clicks the down arrow, a ComboBox can easily fit in a small space where a ListBox would not fit. An exception is when the AUTODROP setting is set to ON or AUTODROPDOWN property of the ComboBox is set to 'TRUE'. In that case, the full list is displayed, and the ComboBox takes up more room than a ListBox would.
The ListBox control displays a list of items from which the user can select an item. If the total number of items exceeds the number that can be displayed, a scroll bar is automatically added to the ListBox control. When the Multi-Column option is set to true (checked), the ListBox displays items in multiple columns, separated by vertical lines (if Show Lines option is checked) and a horizontal scroll bar appears (if Show Horizontal Scroll Bar is checked and Scroll Width nnnn is defined). When the Multi-Column property is set to false (un-checked), the ListBox displays items in a single column and a vertical scroll bar appears.
For complete details, features, supported PROPERTY commands and tips for improving ComboBox and ListBox performance, please visit:
From The Edge: http://www.razzak.com/fte (Powered by R:WEB Suite)
Topic: ComboBox vs. ListBox - What's the Difference?
Enjoy and make sure to have fun!
Very Best R:egards,
Razzak.
--- RBASE-L ================================================ TO POST A MESSAGE TO ALL MEMBERS: Send a plain text email to [EMAIL PROTECTED]
(Don't use any of these words as your Subject:
INTRO, SUBSCRIBE, UNSUBSCRIBE, SEARCH,
REMOVE, SUSPEND, RESUME, DIGEST, RESEND, HELP)
================================================
TO SEE MESSAGE POSTING GUIDELINES:
Send a plain text email to [EMAIL PROTECTED]
In the message SUBJECT, put just one word: INTRO
================================================
TO UNSUBSCRIBE: Send a plain text email to [EMAIL PROTECTED]
In the message SUBJECT, put just one word: UNSUBSCRIBE
================================================
TO SEARCH ARCHIVES:
Send a plain text email to [EMAIL PROTECTED]
In the message SUBJECT, put just one word: SEARCH-n
(where n is the number of days). In the message body, place any text to search for.
================================================

