Controls for Choices. Let’s look at a couple of new controls: option buttons and check boxes These controls are designed to be used when you want the.

Slides:



Advertisements
Similar presentations
What Was I Thinking??. Key Terms 1. Control 1. Control 2. Design Mode 2. Design Mode 3. Event 3. Event 4. Form 4. Form 5. Interface 5. Interface 6. Properties.
Advertisements

Creating a User Form. A Better Interface Our programs can use input boxes for input and write on the spreadsheet page for output This works ok but is.
1 CS 106, Winter 2009 Class 8, Section 4 Slides by: Dr. Cynthia A. Brown, Instructor section 4: Dr. Herbert G. Mayer,
My Penguin Math Book By:. I see How many penguins do you see? Count them & type the number in the box penguins.
Slide 1 VB Default Controls Text Box, Check Box, Option Button & Frames.
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.
Shorter of two objects and changing color Functions, events and setting the color Susan Rodger, Duke University June 2008.
Scratch the Cat. Object Oriented Programing Writing computer programs Based on Objects Instead of Actions Based on Data Instead of Logic.
05/09/ Introducing Visual Basic Sequence Programming.
Hello World In C++ and Microsoft Visual C++. Directions to begin a project 1. Go to All Programs 2. Open Visual Studio C++ 3. Click on New Project 4.
1 CS 106 Computing Fundamentals II Chapter 29 “Creating A User Form” Herbert G. Mayer, PSU CS Status 7/4/2013 Initial content copied verbatim from CS 106.
An Artists World of Colors A World of Colors Colors are very important in the life of any artist. More importantly it is essential that the artist know.
Shorter of two objects and changing color V2 Functions, events and setting the color in sequence and randomly This is a modification of the Changing Color.
Rubicon ATLAS A Basic User’s Manual.
Chapter 8: Writing Graphical User Interfaces Visual Basic.NET Programming: From Problem Analysis to Program Design.
Changing Color, Using Text Objects, and Random Selection in Alice By Jenna Hayes Under the direction of Professor Susan Rodger Duke University, July 2008.
Big Huge Labs Guided Lesson. If you were going to create an advertisement would you use a billboard or a trading card? A billboard would be used for an.
Controls and Events. The Next Step In the first module, we discussed general problem solving In this module, we’ll apply what we learned, from specification.
AT&T Privacy Bird Screen Shots For more information see
Balancing the scales: Inequalities By Melissa Dalis Professor Susan Rodger Duke University June 2011.
2a – Object Oriented Lingma Acheson Department of Computer and Information Science, IUPUI CSCI N331 VB.NET Programming.
This is the Title slide. To insert a new slide, go to the Insert menu and select New Slide You can select from the slide layout for each new slide used.
VB Objects & Events (Exercises) School of Business Eastern Illinois University © Abdou Illia, Spring 2003 (Week 3, Friday 1/31/2003)
Learning PowerPoint Presenting your ideas as a slide show… …on the computer!
Word By Mrs. Yollis Chaparral Elementary. is a computer program that allows you to create written documents.
COMPUTER PROGRAMMING I 3.02 Apply Properties Associated with the Controls.
Pay Example (PFirst98) Please use speaker notes for additional information!
Ready, SET, go! By Melissa Dalis Professor Susan Rodger Duke University July 2011.
Color. How are shapes and colors alike? Colors are like shapes in that they both can tell us something about a person, place or event. Just like shapes,
FRACTIONS & SHAPES BY:. How many of these are colored red? * out of *.
Hyperstudio: A Beginner’s Tutorial By Judy Swaim.
Graphical User Interfaces Tonga Institute of Higher Education.
1 CS 106 Computing Fundamentals II Chapter 210 “Adding Controls to User Forms” Herbert G. Mayer, PSU CS Status 7/4/2013 Initial content copied verbatim.
2c – Textboxes and Buttons Lingma Acheson Department of Computer and Information Science, IUPUI CSCI N331 VB.NET Programming.
PART TWO Electronic Color & RGB values 1. Electronic Color Computer Monitors: Use light in 3 colors to create images on the screen Monitors use RED, GREEN,
Visual Basic A Quick Tutorial VB Review for ACS 367.
Knowledge Base. Defining a Variable Dim statement Dim intXX As Integer Public in a Module Public dblNN As Double.
Logical Operators.  Quiz  Let's look at the schedule  Logical Operators 2.
Visual Basic.Net. Software to Install Visual Studio 2005 Professional Edition (Requires Windows XP Pro) MSDN Library for Visual Studio 2005 Available.
My Penguin Math Book By:. I see How many penguins do you see? Count them and type the number in the box penguins.
How likely is something to happen..  When a coin is tossed, there are two possible outcomes: heads (H) or tails (T) We say the probability of a coin.
COMPUTER PROGRAMMING I 3.01 Apply Controls Associated With Visual Studio Form.
Visual Basic.NET BASICS Lesson 9 Nested If Statements and Radio Buttons.
Web Forms. Web Forms: A form allows our web visitors to submit information to us. Some examples uses for forms are to let the web user contact us, fill.
Boxes. boxes- learning targets o I will be able to display buttons (boxes) o I will be able to organize boxes o I will be able to create an animation.
3.02 APPLY PROPERTIES ASSOCIATED WITH THE CONTROLS Computer Programming I.
COLORS.
Comparing objects and changing color
Chapter 8: Writing Graphical User Interfaces
3.01 Apply Controls Associated With Visual Studio Form
CS 106 Computing Fundamentals II Chapter 35 “Controls For Choices”
3.01 Apply Controls Associated With Visual Studio Form
Sample to correct Test box with subtitle.
Because you know who said let there be light…
Together Let’s Design an Online Quiz
AN INTRODUCTION TO: POWERPOINT.
Name: _______________________________
Conditionally Confirming a Submit
Colours.
Conditional Logic Presentation Name Course Name
If statements (Inven1, Inven2, Inven2a, Inven3, Inven3a)
What Color is it?.
CS 106 Computing Fundamentals II Chapter 69 “Event Loop”
SBAC Practice at home.
NoodleTools and Diigo.
Group Boxes, Radio buttons and Checked List Boxes
Color Box Button - Gray Type : object Type : object Type : object
CHAPTER FOUR VARIABLES AND CONSTANTS
Move the mouse pointer onto the red box
Let’s Learn the Basic Colors
Presentation transcript:

Controls for Choices

Let’s look at a couple of new controls: option buttons and check boxes These controls are designed to be used when you want the user of the program to have choices We’ll use conditionals to determine which values have been set and have the program act accordingly

Option Buttons Option buttons come in groups. Only one button in the group can be selected. We use the prefix opt for this control. Let’s say there are three buttons in a group for choosing a size, Small, Medium, or Large We can name our buttons optSmall, optMedium, and optLarge

Creating Option Buttons Choose the Option Button tool in the Toolbox and create as many as you want in a group Choose a frame from the Toolbox Put a frame around the option buttons in the group Name the buttons and change their text You are now ready to use them in a program

Check Boxes Check boxes are like option buttons but differ in that more than one in a group can be checked While option buttons make sense for choosing something like model or color, check boxes can be used for choosing something like features, where more than one can be chosen (AC, disk brakes, super sound package, leather seats, fancy wheels, etc.)

Creating Check Boxes It’s the same procedure as for option buttons, but the frame is optional The logic of the associated conditional will be different since more than one can be checked We’ll use the prefix chk for this control

OptionDemo: If statements, check boxes, option buttons

About the Demo Notice that we check if an option or check box’s Value is True to see if it is selected: If chkTaller.Value = True Then btnPush.Height = btnPush.Height * 2 End If

Events Checking a box or selecting a button is an event. But if there is no code for an event, nothing happens There is no code for the event of selecting the red, blue, and green buttons. Their values are checked during the btnPush click event There is code for selecting the white and yellow buttons. That is why the color changes right away when you select them