ListBox, ComboBox, Menu - PowerPoint PPT Presentation

1 / 10
About This Presentation
Title:

ListBox, ComboBox, Menu

Description:

Combines TextBox features with a short drop-down list. cboOne. ... Specifies whether user can select more than one item. SelCount. Number of list items selected ... – PowerPoint PPT presentation

Number of Views:148
Avg rating:3.0/5.0
Slides: 11
Provided by: panther
Category:

less

Transcript and Presenter's Notes

Title: ListBox, ComboBox, Menu


1
ListBox, ComboBox, Menu
Chapter 5.4, 12.1
2
ComboBox Control Properties Methods
  • Combines TextBox features with a short drop-down
    list
  • cboOne.AddItem(string)
  • List
  • Strings displayed in the ComboBox, as an array
  • cboOne.List(3)
  • ListCount
  • Contains the number of list items
  • ListIndex
  • Index of the selected item

3
ComboBox Control Properties Methods
  • Locked
  • When True user can not type data in the ComboBox
  • Sorted
  • When True items in the list are sorted
  • RemoveItem
  • Removes an item from list
  • Clear
  • Removes all items from the list

4
ComboBox Styles
  • DropDown
  • Allows user entry
  • Simple
  • Visual appearance of a textbox
  • Items are listed by arrow keys
  • Allows user entry
  • DropDownList
  • Does not allow user entry
  • Fast movement to an item by first character

5
ListBox Control
  • Let user to view a list of items
  • Allow user to select one or more items
  • lstOne.AddItem(string)
  • List
  • Strings displayed in the list, in an array like
    form
  • lstOne.List(3)
  • ListCount
  • Contains the number of list items
  • ListIndex
  • Index of the selected item
  • What if more than one item is selected?

6
ListBox Control Properties Methods
  • Selected
  • Array of Boolean values
  • Each is set to true only if the corresponding
    element is selected
  • MultiSelect
  • Specifies whether user can select more than one
    item
  • SelCount
  • Number of list items selected
  • Sorted
  • When True items in the list are sorted
  • RemoveItem
  • Removes an item from list
  • Clear
  • Removes all items from the list

7
ListBox Styles
  • None
  • Does not allow multiple selection
  • Simple
  • Allows multiple selection
  • Selection is done by mouse or Space bar
  • 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
  • There are 3 ways to start menu editor
  • Click the Menu Editor button on the toolbar
  • Choose Tools/Menu Editor
  • Press CtrlE
  • Each line of text in a menu is a Menu Control

9
Menu Control Properties
  • Caption
  • Actual text displayed in the menu item
  • Name
  • Unique identifier used by the program
  • Index
  • Used if menu item is part of a control array
  • Shortcut
  • Key combinations can be set for shortcuts
  • Checked
  • When true, a check mark appears to the left of
    menu item

10
Menu Editor Example
Write a Comment
User Comments (0)
About PowerShow.com