Page 62 - Open Soource Technologies 304.indd
P. 62

Event Driven Programming



                           Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As_
                           System.EventArgs) Handles_ MyBase.Load
                           Dim CheckBox1 As New CheckBox()
                           CheckBox1.Text = "Checkbox1"
                           CheckBox1.Location = New Point(100, 50)
                           CheckBox1.Size = New Size(95, 45)
                           Me.Controls.Add(CheckBox1)
                           End Sub


                          3.4.6 ListBox
                          The ListBox control displays a list of items from which we can make a selection. We can select
                          one or more than one of the items fromthe list. The ListBox control is based on the ListControl
                          class which is based on the Control class. The Figure 3.16 displays a ListBox.



























                                                          Figure 3.16:  ListBox.

                          3.4.6.1 Notable Properties of the ListBox
                          3.4.6.1.1 In the Behavior Section
                          Horizontal Scrollbar: Displays a horizontal scrollbar to the ListBox. Works when the ListBox has
                          Multiple Columns.
                          Multi Column:  The default value is set to False. Set it to True if you want the list box to display
                          multiple columns.
                          Scroll AlwaysVisible: Default value is set to False. Setting it to True will display both Vertical
                          and Horizontal scrollbar always.
                          SelectionMode: Default value is set to one. Select option None if you do not any item to be
                          selected. Select it to MultiSimple if you want multiple items to be selected. Setting it to
                          MultiExtended allows you to select multiple items with the help of Shift, Control and arrow keys
                          on the keyboard.


                          56                     LOVELY PROFESSIONAL UNIVERSITY
   57   58   59   60   61   62   63   64   65   66   67