When we take ListBox is
TextBox controls both have their own advantages and Disadvantages
TextBox:
-
Advantage: -
User can enter the data at Runtime
Disadvantage: -
It’s not possible to display group of items to the user
ListBox:
-
Advantage: - We can display
group of items to user
Disadvantage: -
User can’t enter any data at runtime
ComboBox is the
combination of both TextBox & ListBox controls     In ComboBox control, user can enter the
data at run time and also we can display group of items to the user
Properties and Methods with ComboBox Class
SNO 
 | 
  
Property and
  options 
 | 
  
Type 
 | 
  
Description 
 | 
 
01 
 | 
  
Items
  (Collection) 
 | 
  
Object
  Collection Class 
 | 
  
Stores
  all the elements in the form of collection and each element is identified
  using index value 
 | 
 
02 
 | 
  
DropDownStyle 
        Simple 
        DropDown 
           (Default) 
       DropDownList 
 | 
  
enum 
 | 
  
Simple:
  ComboBox looks like TextBox and ListBox, user can enter any data at runtime
  and also can select any item in the list 
DropDown:
  ComboBox appearance does not change, user can enter any data at runtime and
  also can select any item in the list 
DropDownList:
  ComboBox appearance does not change, user cannot enter any data at runtime
  but can select any item in the list 
 | 
 
03 
 | 
  
MaxDropDownItems 
 | 
  
int 
 | 
  
Used
  set a value that how many items should be displayed to the user in drop down
  list 
 | 
 
04 
 | 
  
Sorted 
        True 
        False(Default) 
 | 
  
bool 
 | 
  
True: Items are
  arranged in the alphabetical order 
False: Items are not
  arranged in the alphabetical order 
 | 
 
Properties at Run Time:
-
SNO 
 | 
  
Property and
  options 
 | 
  
Type 
 | 
  
Description 
 | 
 
01 
 | 
  
SelectedItem 
 | 
  
object 
 | 
  
Sets
  or gets the item value selected 
 | 
 
02 
 | 
  
SelectedIndex 
 | 
  
object 
 | 
  
Sets
  or gets index value of the item selected 
 | 
 
No comments:
Post a Comment