Graphical User Interface Concepts - Part 1 Session 08 Mata kuliah: M0874 – Programming II Tahun: 2010.

Slides:



Advertisements
Similar presentations
Working with Tables for Page Design – Lesson 41 Working with Tables for Page Design Lesson 4.
Advertisements

© by Pearson Education, Inc. All Rights Reserved. continued …
Guide to Oracle10G1 Introduction To Forms Builder Chapter 5.
IS 1181 IS 118 Introduction to Development Tools VB Chapter 03.
Flowchart Start Input weight and height
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.
1 Introduction to the Visual Studio.NET IDE Powerpoint slides modified from Deitel & Deitel.
Chapter 4: Working with Windows Types of Windows –Program Windows –Message Boxes –Dialog Boxes Elements of a Window –Window Panes –Scroll Bars –Menus –Tool.
Chapter 3 Introduction to Event Handling and Windows Forms Applications.
Microsoft Visual Basic 2012 CHAPTER TWO Program and Graphical User Interface Design.
BIM313 – Advanced Programming Simple Controls 1. Contents Traditional Controls – Labels, Text Boxes, Buttons, Check Boxes, List Boxes, Combo Boxes Advanced.
BUILDING RICH MEDIA ELEMENTS. Design Decisions Based on Design Specification  Following the design specification will ensure that the application is.
XHTML Introductory1 Forms Chapter 7. XHTML Introductory2 Objectives In this chapter, you will: Study elements Learn about input fields Use the element.
Department of Mechanical Engineering, LSUSession VII MATLAB Tutorials Session VIII Graphical User Interface using MATLAB Rajeev Madazhy
IE 411/511: Visual Programming for Industrial Applications
© 2006 Lawrenceville Press Slide 1 Chapter 3 Visual Basic Interface.
Chapter 1: An Introduction to Visual Basic 2005 Programming with Microsoft Visual Basic 2005, Third Edition.
Chapter 12: Using Controls. Examining the IDE’s Automatically Generated Code A new Windows Forms project has been started and given the name FormWithALabelAndAButton.
Chapter 2 More Controls Programming in C#. NET © 2003 by The McGraw-Hill Companies, Inc. All rights reserved.
Java Software Solutions Lewis and Loftus Chapter 10 1 Copyright 1997 by John Lewis and William Loftus. All rights reserved. Graphical User Interfaces --
Visual Basic 2005 CHAPTER 2 Program and Graphical User Interface Design.
Tutorial 7 Creating Forms. Objectives Session 7.1 – Create an HTML form – Insert fields for text – Add labels for form elements – Create radio buttons.
Microsoft Visual Basic 2005: Reloaded Second Edition Chapter 2 Creating a User Interface.
Graphical User Interface Concepts - Part 2 Session 09 Mata kuliah: M0874 – Programming II Tahun: 2010.
© Copyright by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved. Chapter 12 - Graphical User Interface Concepts: Part.
Visual C# 2012 How to Program 1. 2  A graphical user interface (GUI) allows a user to interact visually with a program.  Figure 14.1 shows a Visual.
© 2011 Delmar, Cengage Learning Chapter 1 Getting to Know Illustrator.
Graphical User Interfaces 2 Tonga Institute of Higher Education.
T U T O R I A L  2009 Pearson Education, Inc. All rights reserved. 1 3 Welcome Application Introduction to Visual Programming.
1. Chapter 10 Managing and Printing Documents 3 Working with Files and Printing You can open multiple documents in Word. When multiple documents are.
Creating Graphical User Interfaces (GUI’s) with MATLAB By Jeffrey A. Webb OSU Gateway Coalition Member.
WaveMaker Visual AJAX Studio 4.0 Training Basics: Building Your First Application Designer Basics.
Visual Basic 2005 CHAPTER 2 Program and Graphical User Interface Design.
Visual C# 2012 How to Program © by Pearson Education, Inc. All Rights Reserved.
Chapter 2 – Introduction to the Visual Studio .NET IDE
Chapter 4 Working with Frames. Align and distribute objects on a page Stack and layer objects Work with graphics frames Work with text frames Chapter.
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.
COMPUTER PROGRAMMING I SUMMER 2011 Objective 8.02 Apply Procedures to Create Picture Boxes using Images. (5%)
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,
Visual Basic Programming Introduction VB is one of the High level language VB has evolved from the BASIC language. BASIC stands for Beginners All-purpose.
McGraw-Hill © 2010 The McGraw-Hill Companies, Inc. All rights reserved. Chapter 2 User Interface Design.
Microsoft Visual Basic 2010 CHAPTER TWO Program and Graphical User Interface Design.
© 2011 Delmar, Cengage Learning Chapter 4 Working with Frames.
CMPF114 Computer Literacy Chapter 3 The Visual Basic Environment 1.
T U T O R I A L  2009 Pearson Education, Inc. All rights reserved. 1 4 Designing the Inventory Application Introducing TextBox es and Button s.
Chapter 2 More Controls Programming in C#. NET Objectives Use text boxes, group boxes, check boxes, radio buttons, and picture boxes effectively.
Addison Wesley is an imprint of © 2011 Pearson Addison-Wesley. All rights reserved. Chapter 2 Creating Applications with Visual Basic.
1 Windows Forms II Chapter RadioButton / GroupBox Controls Used to solicit a multiple choice input. Radio buttons work as a group. Selecting one.
IE 411/511: Visual Programming for Industrial Applications Lecture Notes #2 Introduction to the Visual Basic Express 2010 Integrated Development Environment.
 2002 Prentice Hall. All rights reserved. 1 Introduction to the Visual Studio.NET IDE Outline Introduction Visual Studio.NET Integrated Development Environment.
1 Chapter 6: Creating Oracle Data Block Forms. 2 Forms  Application with a graphical user interface that looks like a paper form  Used to insert, update,
ANDROID LAYOUTS AND WIDGETS. Slide 2 Introduction Parts of the Android screen Sizing widgets and fonts Layouts and their characteristics Buttons, checkboxes.
 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.
 2007 Pearson Education, Inc. All rights reserved Graphical User Interface Concepts: Part 1.
Chapter 1: An Introduction to Visual Basic .NET
Chapter 1: An Introduction to Visual Basic 2015
Chapter 2 – Introduction to the Visual Studio .NET IDE
Graphical User Interface Concepts: Part I
Program and Graphical User Interface Design
Basic XHTML Tables XHTML tables—a frequently used feature that organizes data into rows and columns. Tables are defined with the table element. Table.
Chap 7. Building Java Graphical User Interfaces
Graphical User Interfaces -- Introduction
Visual programming Chapter 3: GUI (Graphical User Interface) Part I
Program and Graphical User Interface Design
Variables and Arithmetic Operations
Chapter 2 User Interface Design
Overview of the IDE Visual Studio .NET is Microsoft’s Integrated Development Environment (IDE) for creating, running and debugging programs (also.
Presentation transcript:

Graphical User Interface Concepts - Part 1 Session 08 Mata kuliah: M0874 – Programming II Tahun: 2010

Bina Nusantara University 3 Outline Materi Introduction Windows Forms Event Handling Model Control Properties and Layout Labels, TextBoxes, and Buttons GroupBoxes and Panels CheckBoxes and RadioButtons PictureBoxes

Bina Nusantara University 4 Introduction A graphical user interface (GUI) allows a user to interact visually with a program. A GUI gives a program a distinctive “look” and “feel”. Providing different applications with a consistent set of intuitive user-interface components enables users to become productive with each application faster. GUIs are built from GUI controls (which are sometimes called components or widgets).

Bina Nusantara University 5 Introduction GUI controls are objects that can display information on the screen or enable users to interact with an application via the mouse, keyboard or some other form of input.

Bina Nusantara University 6 Some basic GUI controls ControlDescription LabelDisplays images or uneditable text. TextBoxEnables the user to enter data via the keyboard. It can also be used to display editable or uneditable text. ButtonTriggers an event when clicked with the mouse. CheckBoxSpecifies an option that can be selected (checked) or unselected (not checked). ComboBoxProvides a drop-down list of items from which the user can make a selection either by clicking an item in the list or by typing in a box. ListBoxProvides a list of items from which the user can make a selection by clicking an item in the list. PanelA container in which controls can be placed and organized. NumericUpDownEnables the user to select from a range of input values.

Bina Nusantara University 7 Windows Forms Windows Forms are used to create the GUIs for programs. A Form is a graphical element that appears on your computer’s desktop; it can be a dialog, a window or an MDI window (multiple document interface window) A component is an instance of a class that implements the IComponent interface, which defines the behaviors that components must implement, such as how the component is loaded.

8 Components and controls for Windows Forms

Bina Nusantara University 9 Event Handling Model Normally, a user interacts with an application’s GUI to indicate the tasks that the application should perform. For example, when you write an in an application, clicking the Send button tells the application to send the to the specified addresses. GUIs are event driven. When the user interacts with a GUI component, the interaction-known as an event-drives the program to perform a task.

10

Bina Nusantara University 11 Simple event-handling example using visual programming

Bina Nusantara University 12 Control Properties and Layout

Bina Nusantara University 13 Manipulating the Anchor property of a control Anchoring window Click the down-arrow in the Anchor property to display the anchoring window Darkened bars indicate the container’s side(s) to which the control is anchored; use mouse clicks to select or deselect a bar

Control layout properties Description AnchorCauses a control to remain at a fixed distance from the side(s) of the container even when the container is resized. DockAllows a control to span one side of its container or to fill the remaining space in the container. PaddingSets the space between a container’s edges and docked controls. The default is 0, causing the control to appear flush with the container’s sides. LocationSpecifies the location (as a set of coordinates) of the upper-left corner of the control, in relation to its container. SizeSpecifies the size of the control in pixels as a Size object, which has properties Width and Height. MinimumSize, MaximumSizeIndicates the minimum and maximum size of a Control, respectively. 14

Bina Nusantara University 15 Labels Labels provide text information (as well as optional images) and are defined with class Label (a derived class of Control). A Label displays text that the user cannot directly modify. A Label’s text can be change programmatically by modifying the Label’s Text property. Common Label PropertiesDescription FontThe font of the text on the Label. TextThe text on the Label. TextAlignThe alignment of the Label’s text on the control- horizontally (left, center, right) and vertically (top, middle or bottom)

Bina Nusantara University 16 TextBoxes A textbox (class TextBox) is an area in which either text can be displayed by a program or the user can type text via the keyboard. A password TextBox is a TextBox that hides the information entered by the user. It masks the user input by displaying a password character (UseSystemPasswordChar).

TextBox properties and an event Description Common Properties AcceptsReturnIf true in a multiline TextBox, pressing Enter in the TextBox creates a new line. If false, pressing Enter is the same as pressing the default Button on the Form. The default Button is the one assigned to a Form’s AcceptButton property. MultilineIf true, the TextBox can span multiple lines. The default value is false. ReadOnlyIf true, the TextBox has a gray background, and its text cannot be edited. The default value is false. ScrollBarsFor multiline textboxes, this property indicates which scrollbars appear (None, Horizontal, Vertical or Both). TextThe TextBox’s text content. UserSystemPasswordCharWhen this property is set to true, the TextBox becomes a password TextBox, and the system-specified character masks each character the user types. Common Event TextChangedGenerated when the text changes in a TextBox (i.e., when the user adds or deletes characters). When you double click the TextBox controlin Design mode, an empty event handler for this event is generated.

Bina Nusantara University 18 Buttons A button is a control that the user clicks to trigger a specific action or to select an option in a program. A program can use several types of buttons, such as checkboxes and radio buttons. Button properties and events Description Common Properties TextSpecifies the text displayed on the Button face. FlatStyleModifies a Button’s appearance-attribute Flat (for the Button to display without a three- dimensional appearance), Popup (for the Button to appear flat until the user moves the mouse pointer over the Button), Standard (three-dimensional) and System, where the Button’s appearance is controlled by the operating system. The default is Standard. Common Event ClickGenerated when the user clicks the Button. When you double click a Button in design view, an empty event handler for this event is created.

Bina Nusantara University 19 GroupBoxes and Panels GroupBoxes and Panels arrange controls on a GUI. GroupBoxes and Panels are typically used to group several controls of similar functionality or several controls that are related in a GUI. All of the controls in a GroupBox or Panel move together when the GroupBox or Panel is moved.

Bina Nusantara University 20 The primary difference between these two controls is that GroupBoxes can display a caption (i.e., text) and do not include scrollbars, whereas Panels can include scrollbars and do not include a caption, GroupBoxes have thin borders by default; Panels can be set so that they also have borders by changing their BorderStyle property. Panels and GroupBoxes can contain other Panels and GroupBoxes for more complex layouts.

Bina Nusantara University 21 GroupBoxes and Panels Properties GroupBoxes propertiesDescription ControlsThe set of controls that the GroupBox contains. TextSpecifies the caption text displayed at the top of the GroupBox. Panel propertiesDescription AutoScrollIndicates whether scrollbars appear when the Panel is too small to display all of its controls. The default value is false. BorderStyleSets the border of the Panel. The default value is None; other options are Fixed3D and FixedSingle. ControlsThe set of controls that the Panel contains.

Bina Nusantara University 22 CheckBoxes A CheckBox is a small square that either is blank or contains a check mark. When the user clicks a CheckBox to select it, a check mark appears in the box. If the user clicks CheckBox again to deselect it, the check mark is removed. Configure a CheckBox to toggle between three states (checked, unchecked and indeterminate) by setting its ThreeState property to true. Any number of CheckBoxes can be selected at a time.

Bina Nusantara University 23 CheckBox properties and events

Bina Nusantara University 24 RadioButtons Radio buttons (defined with class RadioButton) are similar to CheckBoxes in that they also have two states-selected and not selected (also called deselected). Normally appears as a group, in which only one RadioButton can be selected at a time. RadioButtons are used to represent a set of mutually exclusive options (i.e., a set in which multiple options cannot be selected at the same time).

Bina Nusantara University 25 RadioButtons Use RadioButtons when the user should choose only one option in a group. Use CheckBoxes when the user should be able to choose multiple options in a group. RadioButton properties and an event Description Common properties CheckedIndicates when the RadioButton is checked. TextSpecifies the RadioButton’s text. Common Event CheckedChangedGenerated every time the RadioButton is checked or unchecked. When you double click a RadioButton control in design view, an empty event handler for this event is generated.

Bina Nusantara University 26 PictureBoxes A PictureBox displays an image. The image can be one of several formats, such as bitmap, GIF (Graphics Interchange Format) and JPEG. A PictureBox’s Image property specifies the image that is displayed, and the SizeMode property indicates how the image is dislayed (Normal, StretchImage, AutoSize, CenterImage or Zoom).

PictureBox properties and event PictureBox properties and an eventDescription Common Properties ImageSets the image to display in the PictureBox. SizeModeEnumeration that controls image sizing and positioning. Values are Normal (default), StretchImage, AutoSize, CenterImage, and Zoom. Normal places the image in the PictureBox’s top-left corner, and CenterImage puts the image in the middle. These two options truncate the image if it’s too large. StrechImage resizes the image to fit in the PictureBox. AutoSize resizes the PictureBox to hold the image. Common Event ClickOccurs when the user clicks a control. When you double click this control in the designer, an event handler is generated for this event.

Bina Nusantara University 28 References station.com/tutorials/Lesson13.aspxhttp:// station.com/tutorials/Lesson13.aspx RzsC&printsec=frontcover&dq=c%23&source=gbs_ similarbooks_s&cad=1#v=onepage&q=&f=falsehttp://books.google.co.id/books?id=euV7e2f- RzsC&printsec=frontcover&dq=c%23&source=gbs_ similarbooks_s&cad=1#v=onepage&q=&f=false