Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
Slide 1 of 38
Session 3
Advanced Controls
Trnh by : V Ngc t Email : vongocdatit@gmail.com in thoi : 0934.969.680
9/12/2013
Slide 2 of 26
Module Introduction
The Selection list controls that are used for selecting a value from a list. The ListView control displays a collection of items within a collection. The TreeView control displays the data in a hierarchical manner.
The RichTextBox control allows displaying, entering, and manipulating text within the control.
The ProgressBar control is used in applications
9/12/2013
Slide 3 of 38
9/12/2013
Slide 4 of 38
"NumericUpDown" Control
The NumericUpDown control is a selection list control that allows you to select numeric values from a range of values.
9/12/2013
Property Increment Maximum Description
Slide 5 of 38
Specifies or retrieves the value by which the current value in the control will be incremented or decremented when up or down button is clicked. Specifies or retrieves the maximum value that the control can have in a particular range.
Minimum
ThousandsSeparator Value Method DownButton UpButton Event ValueChanged
Specifies or retrieves the minimum value that the control can have in a particular range.
Specifies or retrieves a value indicating whether a thousands separator is displayed in the up-down control. Specifies or retrieves the value assigned to the control. Description Decreases the value of the up-down control. Increases the value of the up-down control. Description Occurs when the Value property of the control has been changed.
9/12/2013
Slide 6 of 38
"DomainUpDown" Control
The DomainUpDown control is a selection list control that allows you to select text values from a range of values. This control is generally used when the range of values indicates an order such as days of a week and months of the year.
9/12/2013
Property Items MaximumSize MinimumSize Readonly SelectedItem Method DownButton UpButton Event Description Assigns a collection of objects to the control. Specifies or retrieves the maximum size of the up and down arrows. Specifies or retrieves the minimum size of the up and down arrows.
Slide 7 of 38
Specifies or retrieves a value indicating whether the text in the control can be modified using the up and down buttons. Specifies or retrieves the selected item using the index value of the selected item in the collection. Description Displays the next item present in the object collection. Displays the previous item present in the object collection. Description
Selectedltemchanged
Occurs when the value of the Selectedltem property has been changed.
9/12/2013
Slide 8 of 38
"ListView" Control
The ListView control is used to display a collection of items in a list. This control allows you to add items to a collection and displays the items along with their icons, which can be small or large in size. There are five main views of ListView control,which are listed as follows: + Tile + List + Details + SmallIcon + LargeIcon
9/12/2013
Property Columns Items MultiSelect SelectedItems View Description
Slide 9 of 38
Retrieves the collection of all column headers that are displayed in the control. Retrieves a collection that contains all items in the control. Specifies or retrieves a value that indicates whether multiple items can be selected. Retrieves the items that are selected in the control. Specifies or retrieves how items are displayed in the control. The value of this property can be set using the different types of views defined in the View enumeration. The different types of views are Tile, List, Details, Smalllcon and Largelcon. Description Arranges icons in the control when they are displayedas icons. Removes all items and columns from the control. Retrieves the item at a specified location.
Sort
Event ColumnClick Itemcheck ItemSelectionChanged
SelectedIndexChanged
Occurs when the index of the selected item in the list view control is modified.
9/12/2013
Slide 10 of 38
9/12/2013
Slide 11 of 38
"TreeView" Control
The TreeView control displays data in a hierarchical manner. This control is similar to the left pane of the Windows Explorer. The TreeView control has three types of nodes. These are:
+ Root + Parent + Leaf
9/12/2013
Property Description
Slide 12 of 38
Nodes
SelectedNode ShowPlusMinus ShowRootLines TopNode Method GetNodeAt GetNodeCount
Event
AfterCollapse AfterExpand AfterSelecc NodeMouseClick
Description
Occurs after the tree node is collapsed. Occurs after the tree node within the control is expanded. Occurs after the tree node is selected. Occurs when the user clicks a TreeNode with the mouse.
9/12/2013
Slide 13 of 38
9/12/2013
Slide 14 of 38
"RichTextBox" Control
The RichTextBox control is used for displaying, entering, and manipulating text data. The control is similar to the WordPad application, as it allows text formatting such as making the text bold, applying bullets and links, and changing the font of the text. The control also loads text and embedded images from a file, provides undo and redo editing operations, and allows you to find specified characters. The RichTextBox control, by default, displays both horizontal and vertical scrollbars. The text in the RichTextBox control can either be accessed in text format or in rich text format (.rtf).
9/12/2013
Property Font ScrollBars Description Specifies or retrieves the font of the text displayed in the control. Specifies or retrieves the type of scroll bars for the control.
Slide 15 of 38
SelectedText
SelectionFont SelectionLength Text wordwrap Method AppendText Copy Paste Redo Undo SelectAll Event HScroll VScroll
9/12/2013
Slide 16 of 38
9/12/2013
Slide 17 of 38
9/12/2013
Slide 18 of 18
"ProgressBar" Control
The ProgressBar control is a window that can be used to indicate the progress of an operation in an application. This gives you an idea about how long it will take for the process to get complete.
The ProgressBar control can be implemented with or without using visual styles.