Download presentation
Presentation is loading. Please wait.
Published byNorma Holland Modified over 9 years ago
1
ListBox, ComboBox, Menu Chapter 5.4, 12.1
2
ComboBox Control: Properties & Methods u Combines TextBox features with a short drop- down list cboOne.AddItem(string) u List Strings displayed in the ComboBox, as an array cboOne.List(3) u ListCount Contains the number of list items u ListIndex Index of the selected item
3
ComboBox Control Properties & Methods u Locked When True user can not type data in the ComboBox u Sorted When True items in the list are sorted u RemoveItem Removes an item from list u Clear Removes all items from the list
4
ComboBox Styles u DropDown Allows user entry u Simple Visual appearance of a textbox Items are listed by arrow keys Allows user entry u DropDownList Does not allow user entry Fast movement to an item by first character
5
ListBox Control u Let user to view a list of items u Allow user to select one or more items lstOne.AddItem(string) u List Strings displayed in the list, in an array like form lstOne.List(3) u ListCount Contains the number of list items u ListIndex Index of the selected item What if more than one item is selected?
6
ListBox Control: Properties & Methods u Selected Array of Boolean values Each is set to true only if the corresponding element is selected u MultiSelect Specifies whether user can select more than one item u SelCount Number of list items selected u Sorted When True items in the list are sorted u RemoveItem Removes an item from list u Clear Removes all items from the list
7
ListBox Styles u None Does not allow multiple selection u Simple Allows multiple selection Selection is done by mouse or Space bar u Extended Allows multiple selection Selection is done by mouse or Space bar Holding the Shift key and selecting an item selects all items between the last selection and the current selection
8
Menu Editor u There are 3 ways to start menu editor: Click the Menu Editor button on the toolbar Choose Tools/Menu Editor Press Ctrl+E u Each line of text in a menu is a Menu Control
9
Menu Control Properties u Caption Actual text displayed in the menu item u Name Unique identifier used by the program u Index Used if menu item is part of a control array u Shortcut Key combinations can be set for shortcuts u Checked When true, a check mark appears to the left of menu item
10
Menu Editor Example
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.