List-based Controls. Slide 2 Introduction There are several controls that work with lists ComboBox ListBox CheckedListBox.

Slides:



Advertisements
Similar presentations
Lists, Loops, Validation, and More
Advertisements

Copyright © 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Slide 5- 1 STARTING OUT WITH Visual Basic 2008 FOURTH EDITION Tony Gaddis.
List Box in Widget Swap Drop Down Lists in GPE Naming Convention List boxeslst (El Es Tee – not 1 s t) Drop Down Listscbo (for combo box – old name)
VB List(Of type) A List can be thought of as an array that automatically adjusts its size as elements are added and removed A List may hold only objects.
Programming with Microsoft Visual Basic 2008 Fourth Edition
Programming with Microsoft Visual Basic th Edition
Pemrograman VisualMinggu …8… Page 1 MINGGU Ke Delapan Pemrograman Visual Pokok Bahasan: Graphical User Interface Tujuan Instruksional Khusus: Mahasiswa.
Using Looping Structures and Lists Chapter 4. For … Next Statements Repeat a specific number of times For intCounter = 1 To 5 –Statement block Next intCounter.
Microsoft Visual C#.NET: From Problem Analysis to Program Design1 Chapter 9 Programming Based on Events Microsoft Visual C#.NET: From Problem Analysis.
C# Programming: From Problem Analysis to Program Design1 9 Programming Based on Events.
1 Lab6 Lab6 ComboBox Control Properties, Methods and Events.
VB.Net Loops.
IS 1181 IS 118 Introduction to Development Tools VB Chapter 03.
Programming Based on Events
Lab4 ListBox Control Properties, Methods and Events.
VB Default Controls List Box, Combo Box
ListBoxes The list box control allows the user to view and select from multiple items in a list. CheckedListBox control extends a list box by including.
Group Boxes and Panels Arrange components on a GUI Buttons and etc. can be placed inside a group box or panel. All these buttons move together when the.
Programming Based on Events
Copyright 2003 : Ismail M.Romi, PPU. All Rights Reserved 1 Lab5 ListBox Control Properties, Methods and Events.
CA 121 Intro to Programming Tariq Aziz and Kevin Jones GUI Programming in Visual Studio.NET Chapter 3 Tariq Aziz and Kevin Jones.
Compunet Corporation Programming with Visual Basic.NET GUI Chapter 3 Week 13 Tariq Aziz and Kevin Jones.
Chapter 8 Using Repetition with Loops and Lists. Class 8: Loops and Lists Write Do loops to execute statements repeatedly Write For loops to execute statements.
BIM313 – Advanced Programming Simple Controls 1. Contents Traditional Controls – Labels, Text Boxes, Buttons, Check Boxes, List Boxes, Combo Boxes Advanced.
Microsoft Visual Basic 2010: Reloaded Fourth Edition Chapter Six Repeating Program Instructions.
1 Graphical User Interfaces Part 2 Outline ListBoxes and CheckedListBoxes ListBoxes CheckedListBoxes ComboBoxes.
1 Web-Enabled Decision Support Systems Windows Forms and Controls Prof. Name Position (123) University Name.
110 M - 1 ListBoxes & ComboBoxes Provide a list for the user to select from Various styles, choose based on –Amount of data to be displayed –Space available.
Microsoft Visual Basic 2010: Reloaded Fourth Edition Chapter Seven More on the Repetition Structure.
CIS 338: VB.NET Components Dr. Ralph D. Westfall April, 2011.
ListBox, ComboBox, Menu Chapter 5.4, ComboBox Control: Properties & Methods u Combines TextBox features with a short drop- down list  cboOne.AddItem(string)
© Copyright by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved. Chapter 13 – Graphical User Interfaces Part 2 Outline.
© 2012 EMC Publishing, LLC Slide 1 Chapter 7 The Math Class  Includes shared methods that perform common math functions.  Math Class methods include:
Controls in C++/CLI (2) CheckBox RadioButton GroupBox ListBox.
© Copyright by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved. 1 Tutorial 17 – Flag Quiz Application Introducing One-Dimensional.
Chapter 6: The Repetition Structure
Microsoft Visual Basic 2008: Reloaded Third Edition Chapter Six The Do Loop and List Boxes.
MIS 3200 – Unit 5.3 Manipulating ListItem controls – Moving ListItems between ListItem controls – Removing ListItems from ListItem controls.
1 Chapter Ten Using Controls. 2 Objectives Learn about Controls How to create a Form containing Labels How to set a Label’s Font How to add Color to a.
Module 1 Window Forms – Basic, Grouping and Graphic controls 1.
WinForms – Basic Controls
7-1 aslkjdhfalskhjfgalsdkfhalskdhjfglaskdhjflaskdhjfglaksjdhflakshflaksdhjfglaksjhflaksjhf.
Controls Part 2. DateTimePicker Control Used for representing Date/Time information and take it as input from user. Date information is automatically.
Copyright (c) 2003 by Prentice Hall Provided By: Qasim Al- ajmi Chapter 3 Some Visual Basic Controls and Events Visual Basic. NET.
AdditionalControls 1. The MenuStrip 2 Double-click Let’s begin to design the menu bar for VB! Let’s begin to design the menu bar for VB! 3.
 A ListBox control displays a list of items and allows the user to select one or more  Drag from Toolbox to create this control on a form.
Iterations (aka Loops). 2 Loops Loops (iterations) are segments of code that may be executed several times. Fixed-count (definite) loops repeat a fixed.
Unit 6 Repetition Processing Instructor: Brent Presley.
Java Swing Controls. JButton One of the most commonly used swing component is Push Button or simply button which is created through JButton class of Swing.
Iterations (aka Loops). 2 Loops Loops (iterations) are segments of code (loop body) that may be executed several times. Fixed-count (definite) loops repeat.
21/03/ Working with Controls Text and List Boxes.
COMPUTER PROGRAMMING I Apply Procedures to Develop List Box and Combo Box Objects.
Graphical User Interface
INF230 Basics in C# Programming
Apply Procedures to Develop Menus, List Box and Combo Box Objects
Programming Based on Events
Apply Procedures to Develop Menus, List Box and Combo Box Objects
IS 350 Loops.
Repeating Program Instructions
Programming Based on Events
Microsoft Visual Basic 2005: Reloaded Second Edition
Welcome with Ifs CSC 230 (Blum).
Window Form Trần Anh Tuấn.
The List Box Control Items can be placed into the list at design time or run time The Sorted property causes items in the list to be sorted automatically.
CIS16 Application Development and Programming using Visual Basic.net
CIS 16 Application Development Programming with Visual Basic
Visual programming Chapter 4: GUI (Graphical User Interface) Part II
Introduction to Problem Solving and Control Statements
Lecture Set 10 Windows Controls and Forms
Visual C# - GUI and controls - 1
Presentation transcript:

List-based Controls

Slide 2 Introduction There are several controls that work with lists ComboBox ListBox CheckedListBox

Slide 3 The ComboBox Control (1) It contains a list of items Items can be populated at run-time or at design-time The SelectedIndexChanged event fires when the user selects an item The SelectedIndex property contains the 0-based index of the selected item The SelectedItem property contains the text that the user sees

Slide 4 The ComboBox Control (2) The DropDownStyle property controls how the list drops-down, and whether the box is editable Count contains the number of items in the list Adding and removing items works the same way as any collection Add, Insert, Clear, Remove

Slide 5 The ComboBox Control Adding items at design-time Set the Items property using the String Collection Editor

Slide 6 The ComboBox Control Adding items at run-time Call the Add method of the Items collection Example for (int x = 2010; x < 2016; x++) { cboSelectYear.Items.Add(x.ToString()); }

Slide 7 The ListBox Control (1) It’s really a ComboBox that does not drop- down Most of the properties work the same way Set the SelectionMode property to select one or many items One, MultiSimple, MultiExtended Call GetSelected and SetSelected to determine whether an item is selected or to select an item

Slide 8 The CheckedListBox Control It’s really just a ListBox control