UI Controls - C Sharp Programming - Lecture Slides, Slides of C Sharp Programming

This programming course teaches different programming concepts with respect to C Sharp Programming. Key points of this lecture are: Ui Controls, Image Resources, Toolstrip Control, Statusstrip Control, Treeview Control, Listview Control, Image Resources Implementation, Image Collection Editor, Drill-Down Interfaces, Treeview Control Relationships

Typology: Slides

2012/2013

Uploaded on 09/27/2013

vikrant
vikrant 🇮🇳

4.4

(9)

119 documents

1 / 60

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
UI Controls
docsity.com
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12
pf13
pf14
pf15
pf16
pf17
pf18
pf19
pf1a
pf1b
pf1c
pf1d
pf1e
pf1f
pf20
pf21
pf22
pf23
pf24
pf25
pf26
pf27
pf28
pf29
pf2a
pf2b
pf2c
pf2d
pf2e
pf2f
pf30
pf31
pf32
pf33
pf34
pf35
pf36
pf37
pf38
pf39
pf3a
pf3b
pf3c

Partial preview of the text

Download UI Controls - C Sharp Programming - Lecture Slides and more Slides C Sharp Programming in PDF only on Docsity!

UI Controls

Overview

 Image Resources

 The ToolStrip control

 The StatusStrip control

 The TreeView control

 The ListView control

Image Resources (Implementation)

 Use the Select Resource dialog box to select an image

 Images can be used by  The form  The entire project

 Images are stored in a resource file having a suffix of .resx

 Note that resources have many other purposes too  They can store just about anything

The ImageList Control (Introduction)

 Like resource files, it stores images

 It’s used with the TreeView and ListView

control

 Use the Image Collection Editor to assign images to the control

 All images in a control instance must have the same size  If images of multiple sizes are necessary, create multiple control instances

The ImageList Control (Properties)

 The Images collection store a reference to

the images

 Use the Add method to add new images

programmatically  Optional argument contains a string key used to reference the image

 Reference in image  By index  By string key  Calling the IndexOfKey method

The ToolStrip Control (Introduction)

 It replaces the ToolBar control

found in previous versions

 It is considered a container control

meaning that it sites other controls

 Clickable buttons on the toolbar, for example  Events fire as the user interacts with these buttons  The implementation is similar to a menu

The Items Collection (Introduction)

 The Items collection is the container

for the control instances appearing

on the toolbar

 Use the Items Collection Editor to

create these control instances

ToolStripButton , Label , DropDownButton , ComboBox , TextBox , ProgressBar

The Items Collection Editor (Illustration)

The ToolStripButton Class

(Members)

 Set the Image property to the image

that will appear on the button

 Images appear in the folder

 Use Checked and CheckOnClick to

create a checked button

 Use DisplayStyle to display text,

images, or both

The ToolStripDropDownButton

Class

 Use this to create a drop-down

button that works similar to a

combo box

 The DropDownItems collection

contains the items that will drop

down

 Each item has a data type of ToolStripMenuItem  Handle the Click event just like any other menu item

Drill-Down Interface

TreeView utilizes a drill down interface to display file hierarchy

ListView displays files and associated icons

TreeView Control Relationships

 Top-level node is a root node

 Root node has no parent node

 Nodes have one or more children

 Children having the same parent are siblings  One sibling is designated as the first sibling and another as the last sibling

 The terms grandchildren and

great grandchildren further

describe relationships

The TreeView Control

(Properties 1)

 The CheckBoxes property can be set to True or False  If set to True , check boxes appear to the left of each TreeNode  If set to False , they do not

ImageIndex property contains the

numeric index of the image from an associated ImageList control instance

ImageList property contains a reference to an instance of the ImageList control

TreeView Control

(Properties 2)

LabelEdit property ( Boolean ) defines

whether or not the user can edit the textual contents of each TreeNode Nodes property references a collection of TreeNode objects  Note that this collection is hierarchical

Scrollable property ( Boolean ) defines

whether or not scroll bars will appear when the TreeNodes will not fit within the visible region of the control instance