Control Structures Part C – Groups of Controls

Slides:



Advertisements
Similar presentations
Continuation of chapter 6…. Nested while loop A while loop used within another while loop is called nested while loop. Q. An illustration to generate.
Advertisements

CS0004: Introduction to Programming Select Case Statements and Selection Input.
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.
C# Programming: From Problem Analysis to Program Design1 Programming Based on Events C# Programming: From Problem Analysis to Program Design 3 rd Edition.
Programming Based on Events
Programming Based on Events
Copyright © 2012 Pearson Education, Inc. Chapter 2 Introduction to Visual C#
Creating web service (and client application) with Visual Studio 2008 Create web service project New project->web->ASP.NET web service application (with.
110-C1 Chapter 2 of the text: _ text boxes, group boxes, check boxes, radio buttons, picture boxes _ defining access keys tab sequence setting the focus.
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.
Chapter 7 Decision Making. Class 7: Decision Making Use the Boolean data type in decision-making statements Use If statements and Select Case statements.
Object Oriented Programming Graphical User Interfaces Dr. Mike Spann
CSCI 3328 Object Oriented Programming in C# Chapter 2: Introduction to Visual C# Programming 1 Xiang Lian The University of Texas Rio Grande Valley Edinburg,
Lecture Set 3 Introduction to Visual Basic Concepts Part C – Design Mode Properties In-Depth Look at Common Features of Controls.
Copyright © 2006 by The McGraw-Hill Companies, Inc. All rights reserved. McGraw-Hill Technology Education Assignment #1 Advanced Computer Programming.
CIS 200 Test 02 Review. Windows Forms, GUI Programming  Elements  Textboxes  Tab Groups  Checkboxes  Fields  Event Handlers  Visual Studio Designer.
11 Web Services. 22 Objectives You will be able to Say what a web service is. Write and deploy a simple web service. Test a simple web service. Write.
Microsoft Visual Basic 2012 CHAPTER THREE Program Design and Coding.
COS240 O-O Languages AUBG, COS dept Lecture 33 Title: C# vs. Java (GUI Programming) Reference: COS240 Syllabus.
Sample Application Multi Layered Architecture (n-tier): –Graphical User Interface (GUI): Forms, components, controls The Visual Designer in Visual Studio.
Visual C# 2012 How to Program © by Pearson Education, Inc. All Rights Reserved.
1 Creating Windows GUIs with Visual Studio. 2 Creating the Project New Project Visual C++ Projects Windows Forms Application Give the Project a Name and.
Visual C# 2012 How to Program © by Pearson Education, Inc. All Rights Reserved.
MS Visual Basic 6 Walter Milner. VB 6 0 Introduction –background to VB, A hello World program 1 Core language 1 –Projects, data types, variables, forms,
Handling View Events. Open the *MainActivity.java* which is the Activity that hosts the layout in "activity_main.xml". The setContentView method inside.
© Copyright by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved. 1 Tutorial 18 – Student Grades Application Introducing.
COMPUTER PROGRAMMING I 3.02 Apply Properties Associated with the Controls.
“everything is an object”. Class Template Code for defining an object Objects are created with NEW keyword (method) Namespace – (disambiguation) Context.
Controls Part 2. DateTimePicker Control Used for representing Date/Time information and take it as input from user. Date information is automatically.
1 Chapter 4 – Decisions 4.1 Relational and Logical Operators (see other set of slides) 4.2 If Blocks (see other set of slides) 4.3 Select Case Blocks (see.
Asp.NET Core Server Controls. Slide 2 Lecture Overview Understanding the types of ASP.NET controls HTML controls ASP.NET (Web) controls.
Architecture Multi Layered Architecture (n-tier): Application: Model Controllers Database Access Graphical User Interface (GUI): Forms, components, controls.
T U T O R I A L  2009 Pearson Education, Inc. All rights reserved Student Grades Application Introducing Two-Dimensional Arrays and RadioButton.
COMPUTER PROGRAMMING I 3.01 Apply Controls Associated With Visual Studio Form.
Overview of Previous Lesson(s) Over View  ASP is a technology that enables scripts in web pages to be executed by an Internet server.  ASP.NET is a.
Lecture Set 7 Procedures and Event Handlers Part B - The Structure of an Application Event Handlers.
Microsoft Visual Basic 2012 CHAPTER FIVE Decision Structures.
Appendix A: Windows Forms. 2 Overview Describe the structure of a Windows Forms application –application entry point –forms –components and controls Introduce.
1 Windows Forms II Chapter RadioButton / GroupBox Controls Used to solicit a multiple choice input. Radio buttons work as a group. Selecting one.
1 Working with Controls at Run Time. 2 Objectives You will be able to Add controls to a Windows form at run time. Modify controls at run time.
COMPUTER PROGRAMMING I 3.01 Apply Controls Associated With Visual Studio Form.
Visual Basic.NET BASICS Lesson 9 Nested If Statements and Radio Buttons.
3.02 APPLY PROPERTIES ASSOCIATED WITH THE CONTROLS Computer Programming I.
XHTML Forms.
Chapter 9 Programming Based on Events
INF230 Basics in C# Programming
Computing with C# and the .NET Framework
Programming Based on Events
C# Programming: From Problem Analysis to Program Design
CSCI 3328 Object Oriented Programming in C# Chapter 2: Introduction to Visual C# Programming UTPA – Fall 2012 This set of slides is revised from lecture.
3.01 Apply Controls Associated With Visual Studio Form
3.01 Apply Controls Associated With Visual Studio Form
Reference: COS240 Syllabus
IS 350 Decision-making.
Visual programming Chapter 3: GUI (Graphical User Interface) Part I
Chapter 2 Visual Basic Interface
Programming Based on Events
The University of Texas – Pan American
Windows Controls Child Window Controls
المحاضرة السادسة.
Self Study GUI Properties & Events
Lecture Set 11 Creating and Using Classes
Lecture Set 10 Windows Controls and Forms
Web Development Using ASP .NET
Chapter 13: Handling Events
Creating Controls Dynamically in C#
label1 Name label2 Time (0-23) textBox1 textBox2 textBox3 button1
Events, Delegates, and Lambdas
Presentation transcript:

Control Structures Part C – Groups of Controls Lecture Set 5 Control Structures Part C – Groups of Controls

Objectives Learn first how to construct grouped controls with statically defined choices (Later – not in this Lecture Set) Learn at least one way to populate a grouped control from a dynamically changeable source such as a simple sequential file or even a database 2/24/2019 11:58 PM

Control Groups Container controls are used to group control instances together The GroupBox control is a container control Visual Studio supports several other container controls 2/24/2019 11:58 PM2/24/2019 11:58 PM

The GroupBox Control (Syntax) The BackColor and ForeColor properties define the color Visual text appears in the Text property 2/24/2019 11:58 PM2/24/2019 11:58 PM

The RadioButton Control The end user selects one button from a group of buttons Members The Text property contains the visible text The Checked property defines whether the RadioButton is selected The CheckedChanged event fires when the button is clicked 2/24/2019 11:58 PM2/24/2019 11:58 PM

Multicast Event Handlers (Introduction) One event handler handles the same event for many control instances The Handles clause contains a comma-separated list of control instances and event names A period separates the control instance and event name 2/24/2019 11:58 PM2/24/2019 11:58 PM

Multicast Event Handlers (Example) Handles click event for all 9 buttons on Tic-Tac-Toe board Uses name (“btnrc”) attribute of button where r is the row ID and c the column ID of the button (0 <= r, c <= 2) // “Wires” event handler to each of 9 buttons (part of nested loops) this.boardView[row, col].Click += new System.EventHandler(this.Button_Click); // One event handler wired to all 9 buttons on the board private void Button_Click(object sender, EventArgs e) { Button thisButton = (Button)sender; thisButton.BackColor = Color.LightGoldenrodYellow; string thisID = thisButton.Name.Substring(3, 2); int rowID = (int)thisID[0] - (int)'0'; int colID = (int)thisID[1] - (int)'0'; ((Button)sender).Enabled = false; ((Button)sender).Text = "C"; } // end Button Click 2/24/2019 11:58 PM2/24/2019 11:58 PM

Multi-cast Event Handlers (Another Example) For more examples, look at Lecture Set 07, particularly: LectureSet07XSender LectureSet07XDynamic 2/24/2019 11:58 PM2/24/2019 11:58 PM