GUI-Labels, TextBoxes and Buttons Label- displays read-only text Label- displays read-only text Common properties: Common properties: Font – font used.

Slides:



Advertisements
Similar presentations
CS0004: Introduction to Programming Select Case Statements and Selection Input.
Advertisements

Pemrograman VisualMinggu …8… Page 1 MINGGU Ke Delapan Pemrograman Visual Pokok Bahasan: Graphical User Interface Tujuan Instruksional Khusus: Mahasiswa.
Microsoft Visual Basic: Reloaded Chapter Seven More on the Repetition Structure.
© 2006 ITT Educational Services Inc. Introduction to Computer Programming: Unit 7: Chapter 4: Slide 1 Unit 7 Decisions (Cont.) and Message Boxes Chapter.
CHAPTER TWO Creating Simple Visual Basic.NET Windows Applications.
© by Pearson Education, Inc. All Rights Reserved. continued …
Guide to Oracle10G1 Introduction To Forms Builder Chapter 5.
Chapter 12- GUI Concepts I. 12.1Introduction 12.2 Windows Forms 12.3 Event-Handling Model Basic Event Handling 12.4 Control Properties and Layout.
GUI-Labels, TextBoxes and Buttons Label- displays read-only text Common properties:  Font – font used by the text of label  Text – text to appear on.
A Guide to Oracle9i1 Introduction To Forms Builder Chapter 5.
Graphical User Interface (GUI) A GUI allows user to interact with a program visually. GUIs are built from GUI components. A GUI component is an object.
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.
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.
Laboratory Exercise # 13 – Font and Number Format Styles Office Productivity Tools 1 Laboratory Exercise # 13 Font and Number Format Styles Objectives:
BIM313 – Advanced Programming Simple Controls 1. Contents Traditional Controls – Labels, Text Boxes, Buttons, Check Boxes, List Boxes, Combo Boxes Advanced.
Chapter 5 Java Script And Forms JavaScript, Third Edition.
CHAPTER TWO Creating Simple Visual Basic.NET Windows Applications.
Chapter 2 More Controls Programming in C#. NET © 2003 by The McGraw-Hill Companies, Inc. All rights reserved.
Liang, Introduction to Java Programming, Fifth Edition, (c) 2005 Pearson Education, Inc. All rights reserved Chapter 13 Creating User.
ACCESS Part 2. OBJECTIVES  Use the Form Wizard  Create a split form  Use Form Layout View  Add fields to a form  Modify form controls  Create calculations.
CIS 338: VB.NET Components Dr. Ralph D. Westfall April, 2011.
T U T O R I A L  2009 Pearson Education, Inc. All rights reserved. 1 8 Dental Payment Application Introducing CheckBox es and Message Dialogs.
JavaScript, Fourth Edition Chapter 5 Validating Form Data with JavaScript.
Chapter One An Introduction to Visual Basic 2010 Programming with Microsoft Visual Basic th Edition.
© Copyright by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved. Chapter 12 - Graphical User Interface Concepts: Part.
Controls in C++/CLI (2) CheckBox RadioButton GroupBox ListBox.
Graphical User Interfaces 2 Tonga Institute of Higher Education.
1. S:\Courses\CSSE\ibrahima\CS2340\Notes Folder Section1 Folder Section2 2.
CHAPTER TWO Creating Simple Visual Basic.NET Windows Applications.
Decisions and Debugging Part06dbg --- if/else, switch, validating data, and enhanced MessageBoxes.
BIM211 – Visual Programming Interacting with Users Graphics 1.
G RAPHICAL U SER I NTERFACE C ONCEPTS : P ART 2 1 Outline Control Properties and Layout Label s, TextBox es and Button s GroupBox es and Panel s CheckBox.
Visual C# 2012 How to Program © by Pearson Education, Inc. All Rights Reserved.
Controls. Adding Controls to Form -You can pick controls from the toolbox. -To add the controls from Toolbox to the Form You have be in design view. -To.
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.
More Controls and Their Properties Part 4 dbg --- TextBox, CheckBox, RadioButton, GroupBox, ToolTips,
SEEM3460 Tutorial GUI in Java. Some Basic GUI Terms Component (Control in some languages) the basic GUI unit something visible something that user can.
COMPUTER PROGRAMMING I 3.02 Apply Properties Associated with the Controls.
Chapter 15 I’m on the Inside; You’re on the Outside (Nested Loops) Clearly Visual Basic: Programming with Visual Basic nd Edition.
Chapter 11 - A GUI Interacting With a Problem Domain Class1 Chapter 11 A GUI Interacting With a Problem Domain Class 11.
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.
2e – RadioButtons Lingma Acheson Department of Computer and Information Science, IUPUI CSCI N331 VB.NET Programming.
Chapter 2 More Controls Programming in C#. NET Objectives Use text boxes, group boxes, check boxes, radio buttons, and picture boxes effectively.
Word Processor Version.01 EME 4411 Week 5. The Scroll Bars.
Graphical User Interface Components Version 1.1. Obectives Students should understand how to use these basic Form components to create a Graphical User.
Chapter 5 Introduction To Form Builder. Lesson C Objectives  Use sequences to automatically generate primary key values in a form  Create lists of values.
Using Custom Submission Questions and Questionnaires in Editorial Manager™ Created by J. Strusz (9/21/2010)
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”
Controls in C++/CLI (2) CheckBox RadioButton GroupBox and Panel.
Hamilton Software Products The Measure of Excellence Customized dialog.
 You won’t write a single line of program code.  Instead, you’ll use visual programming techniques.  Visual Studio processes your actions (such as mouse.
Graphical User Interface Concepts - Part 1 Session 08 Mata kuliah: M0874 – Programming II Tahun: 2010.
(PART II) Graphics and Multimedia. Font Control Font s  After a Font is created, its properties cannot be modified  Programmers must create a new Font.
 2007 Pearson Education, Inc. All rights reserved Graphical User Interface Concepts: Part 1.
Dialog Boxes Getting information from user. Types of Windows Five types we’ll be using 1. Main Application Window 2. Child Windows 3. Dialog Boxes 4.
(PART II) Graphics and Multimedia 11/02/1437 Lect6 (Part 2)
Graphical User Interface Concepts: Part I
Visual programming Chapter 3: GUI (Graphical User Interface) Part I
Variables and Arithmetic Operations
Module 2 إنشاء تطبيقات الويندوز
Part A – Doing Your Own Input Validation with Simple VB Tools
Graphical User Interface Concepts: Part I
Control Structures Part B - Message and Input Boxes
Graphics and Multimedia
Visual C# - GUI and controls - 1
Presentation transcript:

GUI-Labels, TextBoxes and Buttons Label- displays read-only text Label- displays read-only text Common properties: Common properties: Font – font used by the text of label Font – font used by the text of label Text – text to appear on the label Text – text to appear on the label TextAlign – Alignment of the label’s text TextAlign – Alignment of the label’s text Button – user click to trigger a specific action Button – user click to trigger a specific action Common properties Common properties Text Text Common event Common event click click

GUI- TextBoxes Common properties Common properties AcceptsReturn: If true, pressing Enter creates a new line in the text box, if that text box spans multiple lines. If false, press enter clicks the default button of the form AcceptsReturn: If true, pressing Enter creates a new line in the text box, if that text box spans multiple lines. If false, press enter clicks the default button of the form Multiline: if true, text box can span multiple line Multiline: if true, text box can span multiple line PasswordChar:single character to display instead of typed text. PasswordChar:single character to display instead of typed text. ReadOnly: if true, text box has grey background and its text cannot be edited ReadOnly: if true, text box has grey background and its text cannot be edited ScrollBars: for multiple lines text, indicated which scrollbars appear ScrollBars: for multiple lines text, indicated which scrollbars appear Text : text to be displayed in the text box Text : text to be displayed in the text box Common event Common event TextChanged TextChanged

GUI-CheckBoxes Checkbox: Checkbox: A group of check boxes allow the user to select combinations of choices. A group of check boxes allow the user to select combinations of choices. Any number may be selected at a time Any number may be selected at a time The text that appear alongside a check box is referred to as the checkbox label. The text that appear alongside a check box is referred to as the checkbox label. Properties Properties Checked Checked CheckState CheckState Events Events CheckedChanged CheckedChanged CheckStateChanged CheckStateChanged

GUI-RadioButton RadioButton: RadioButton: Several radio buttons group together Several radio buttons group together Only one of the radio buttons in the group can be selected (true) at any time Only one of the radio buttons in the group can be selected (true) at any time Properties: Properties: Checked : specifies whether the radio button is checked Checked : specifies whether the radio button is checked Text: Text displayed to the right of the radio button Text: Text displayed to the right of the radio button Events: Events: Click: Raised when user click the control Click: Raised when user click the control CheckedChanged: Raised every time the radio button is checked or unchecked CheckedChanged: Raised every time the radio button is checked or unchecked

Font property To change the font, the Font property must be set to a Font object To change the font, the Font property must be set to a Font object The Font constructor takes the font name, size and style The Font constructor takes the font name, size and style FontStyle enumeration contains FontStyle enumeration contains Regular Regular Bold Bold Italic Italic Strikeout Strikeout Underline Underline

Lb_message->Font = new Drawing::Font( Lb_message->Font = new Drawing::Font( lb_message->Font->name, lb_message->Font->name, lb_message->Font->size, static_cast (lb_mess age->Font->Style lb_message->Font->size, static_cast (lb_mess age->Font->Style ^FontStyle::Italic) ); ^FontStyle::Italic) );

Bitwise XOR operator ^ Bitwise operator perform manipulation on bits. Bitwise operator perform manipulation on bits. Actions are taken and data are modified using these bits values Actions are taken and data are modified using these bits values Bitwise XOR operator ^ Bitwise XOR operator ^ 0 ^ 0 = 0 0 && 0 = 0 0 || 0 = 0 0 ^ 0 = 0 0 && 0 = 0 0 || 0 = 0 1 ^ 0 = 1 1 && 0 = 0 1 || 0 = 1 1 ^ 0 = 1 1 && 0 = 0 1 || 0 = 1 0 ^ 1 = 1 0 && 1 = 0 0 || 1 = 1 0 ^ 1 = 1 0 && 1 = 0 0 || 1 = 1 1 ^ 1 = 0 1 && 1 = 1 1 || 1 = 1 1 ^ 1 = 0 1 && 1 = 1 1 || 1 = 1 If style is not bold(0), then set to bold(1) If style is not bold(0), then set to bold(1) If style is already bold(1), then set to not bold(0) If style is already bold(1), then set to not bold(0)

MessageBox MessageBox::Show() can take three argument, and return DialogResult MessageBox::Show() can take three argument, and return DialogResult String String MessageBoxButtons MessageBoxButtons OK OK OKCancel OKCancel YesNo YesNo YesNoCancel YesNoCancel AbortRetryIgnore AbortRetryIgnore MessageBoxIcon MessageBoxIcon Error Error Exclamation Exclamation Information Information Question Question

DialogResult DialogResult from MessageBox DialogResult from MessageBox Contain enumeration value Contain enumeration value DialogResult::OK DialogResult::OK DialogResult::Cancel DialogResult::Cancel DialogResult::Abort DialogResult::Abort DialogResult::Retry DialogResult::Retry DialogResult::Ignore DialogResult::Ignore DialogResult::Yes DialogResult::Yes DialogResult::No DialogResult::No