ListBoxes Monday, March 21, 2011 Roxana Gheorghiu.

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.
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.
Working with Intrinsic Controls and ActiveX Controls
Information System Design Lab 5&6. User Interface Design.
MS-Access XP Lesson 2. Input Mask Property 1.Field : Phone No Data Type : Number Input Mask : Character 0 represent a single digit and phone.
Microsoft Expression Web-Illustrated Unit L: Using Code Tools.
Two Point Perspective Directions Follow the power point through the steps to complete each perspective problem. Look for the lines that are blue for the.
Microsoft Visual Basic: Reloaded Chapter Six Repeating Program Instructions.
Lab4 ListBox Control Properties, Methods and Events.
Chapter 5 - Menus, Sub Procedures, and Sub Functions  Menus - controls - properties and events –menu editor - create and change –defining menus - menu.
VB Default Controls List Box, Combo Box
List-based Controls. Slide 2 Introduction There are several controls that work with lists ComboBox ListBox CheckedListBox.
Copyright 2003 : Ismail M.Romi, PPU. All Rights Reserved 1 Lab5 ListBox Control Properties, Methods and Events.
Create a Narrated Story with PowerPoint. Basics Enter Text. (Click in the text box and start typing. If a text box is not visible, go to Insert > Text.
BDT Business Tutorial. Click on the BDT Business icon.
Adding Controls to User Forms. Adding Controls A user form isn’t much use without some controls We’re going to add controls and write code for them Note.
1 ADVANCED MICROSOFT WORD Lesson 15 – Creating Forms and Working with Web Documents Microsoft Office 2003: Advanced.
Chapter 5 new The Do…Loop Statement
Chapter 8: String Manipulation
PowerPoint Exercise: Download this exercise to your computer, then complete the numbered tasks. Fulbright Computer Skills Summer 2012.
Introduction to Graphical User Interfaces. Objectives * Students should understand what a procedural program is. * Students should understand what an.
Ch 11: Userforms CP212 Winter Topics Designing User Forms o Controls Setting Properties o Tab Order o Testing Writing Event Handlers o Userform_Initialize.
T U T O R I A L  2009 Pearson Education, Inc. All rights reserved Typing Application Introducing Keyboard Events, Menus, Dialogs and the Dictionary.
08/10/ Iteration Loops For … To … Next. 208/10/2015 Learning Objectives Define a program loop. State when a loop will end. State when the For.
MIS 3200 – Unit 4.2 ListItem controls – CheckBoxList – ListBox.
ListBox, ComboBox, Menu Chapter 5.4, ComboBox Control: Properties & Methods u Combines TextBox features with a short drop- down list  cboOne.AddItem(string)
Using . Creating and Sending Messages The Inbox view serves as Outlook’s interface Click the Inbox icon in the Outlook Bar or Folder List.
1 Κατανεμημένες Διαδικτυακές Εφαρμογές Πολυμέσων Γιάννης Πετράκης.
1 Κατανεμημένες Διαδικτυακές Εφαρμογές Πολυμέσων Γιάννης Πετράκης.
Microsoft Outlook 2010 Chapter 3 Managing Contacts and Personal Contact Information with Outlook.
Chapter 3 The Visual Basic Editor. Important Features of the VBE Alt-F11 will open the Visual Basic Editor. The Code window is to the right, Project Explorer.
Exercise 5 Introduction to C# CIS This exercise uses Group boxes, Radio buttons, List boxes, and Buttons to allow users to select food items from.
FIX Eye FIX Eye Getting started: The guide EPAM Systems B2BITS.
Click your mouse to continue. The Office Shortcut Bar The Office Shortcut Bar contains program buttons that, when clicked, start new documents or start.
Copyright © Curt Hill More Components Varying the input of Dev-C++ Windows Programs.
CS 101 Test 2 Study Guide Acronyms RAD - Rapid Application Development IDE - Integrated Development Environment GUI - Graphical User Interface VB - Visual.
Slide 1 Using Menu Bar & Common Dialog Boxes. Slide 2 Setting Up the Main Items v First open the form on which you want the menu located v Then start.
 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.
CS4 –lecture 6 Wednesday, Jan 19, 2011 Roxana Gheorghiu.
CPSC 481 – Week #7 Sowmya Somanath
T U T O R I A L  2009 Pearson Education, Inc. All rights reserved Student Grades Application Introducing Two-Dimensional Arrays and RadioButton.
Set Word Option to Reopen a Document in Draft View 1. Click here. 3. Check this box 2. Click here. A document saved in Draft view will not reopen in Draft.
Customizing Menus and Toolbars CHAPTER 12 Customizing Menus and Toolbars.
Using Forms and Form Elements In Visual Basic.NET.
Visual Basic/ Visual Studio Brandon Large. Connecting to prior knowledge In your notes write down what the two main parts of the computer are. The “software”
COMPUTER PROGRAMMING I Apply Procedures to Develop List Box and Combo Box Objects.
Setting up Solver Add-in for Excel
Data types: Complex types (List)
Lexical Reference Variables in Graphics and List Box in Forms
User Forms.
MIS 3200 – Unit 5.2 ListItem controls and accumulation
CIS16 Application Development and Programming using Visual Basic.net
String Manipulation and More Controls
Data Types List Box Combo Box Checkbox Option Box Visual Basic 6.0
Microsoft Visual Basic 2005: Reloaded Second Edition
One Point & Two Point Perspective
Click to edit title TO ADD NEW SLIDE LAYOUTS: Make sure you have the ‘Home’ tab selected at the top of the PowerPoint screen and click the down facing.
EVENT TITLE Time, Date Location
TO ADD NEW SLIDE LAYOUTS: Make sure you have the ‘Home’ tab selected at the top of the PowerPoint screen and click the down facing arrow to the right on.
EVENT TITLE Time, Date Location
TO ADD NEW SLIDE LAYOUTS: Make sure you have the ‘Home’ tab selected at the top of the PowerPoint screen and click the down facing arrow to the right on.
TO ADD NEW SLIDE LAYOUTS: Make sure you have the ‘Home’ tab selected at the top of the PowerPoint screen and click the down facing arrow to the right on.
TO ADD NEW SLIDE LAYOUTS: Make sure you have the ‘Home’ tab selected at the top of the PowerPoint screen and click the down facing arrow to the right on.
Click to edit title TO ADD NEW SLIDE LAYOUTS: Make sure you have the ‘Home’ tab selected at the top of the PowerPoint screen and click the down facing.
TO ADD NEW SLIDE LAYOUTS: Make sure you have the ‘Home’ tab selected at the top of the PowerPoint screen and click the down facing arrow to the right on.
Click to edit title TO ADD NEW SLIDE LAYOUTS: Make sure you have the ‘Home’ tab selected at the top of the PowerPoint screen and click the down facing.
F T T T F.
The button below is set to run the INITIALIZE subroutine
3.3 – Invoke Workflow File Exercise 3.2: Extract as Workflow
Presentation transcript:

ListBoxes Monday, March 21, 2011 Roxana Gheorghiu

Short explanation Next slides list most common properties used with listboxes controls stringValue means that the argument expected or the output for that particular property is a String indexValue means that the argument expected or the output for that particular property is an Integer The green lines give an example of how to use that particular property/function Lst is the variable name of the listbox control

Functions –expect arguments Lst.Items.Add ( stringValue ) : adds at the end of the list Lst.Items.Add (“apple”) Lst.Items.Insert ( indexValue, stringValue ): inserts at a given index Lst.Items.Insert(0,”orange”) Lst.Items ( indexValue): returns the item at index indexValue (returns stringValue ) itemVar =Lst.Items(5) Lst.Items.Remove ( stringValue ): removes an item from the list Lst.Items.Remove(“apple”) Lst.Items.RemoveAt ( indexValue ): removes the item at a given index Lst.Items.RemoveAt(2)

Properties –no arguments Lst.SelectedItem: returns stringValue representing the value of the selected item Item =Lst.SelectedItem Lst.SelectedIndex : returns indexValue representing the index of the item selected. Returns -1 if nothing is selected Index =Lst.SelectedIndex Lst.Items.Count : returns indexValue representing the number of items in the list (same as length property of Strings) Size =Lst.items.Count Lst.Items.Clear: deletes everything in the list

In class exercise Create a program that will have two listboxes: one called lstFruits and the other, called lstColor. Next, the program should do the following:  Display in lstFruits a list of fruits and their color, separated by a “,”. This should be done in the interface design  When you click on any part of the main window (not the button), the program reads one item from the fruit list and adds ONLY the fruit name on that list and the color on the color list  Remove the old values in the lstFruits  Display, in a message box, the fruit selected and its corresponding color. If nothing is selected, display the message: “First select a fruit”

In class exercise (cont.) 5. Display in a new listbox all the fruits and the colors in reversed order: fruit 1 and last color, fruit 2 and next to last color …  Make a CLEAR button that will remove everything from the new list  Make an In Order checkbox. It it’s checked, the fruits are display with their corresponding color. If it’s not checked, the fruits are displayed as in step 5  Make an INSERT button that will allow to insert an item below a selected item. If nothing is selected, it will be add at the end  Make a DELETE button that will delete a selected item. If nothing is selected, a Message box will display the message: “First select something