Lecture (7) Introduction to GUI Eng. Osama Talaat 1.

Slides:



Advertisements
Similar presentations
Introduction to Eclipse. Start Eclipse Click and then click Eclipse from the menu: Or open a shell and type eclipse after the prompt.
Advertisements

User interface Adobe video and audio applications provide a consistent, customizable workspace. Although each application has its own set of panels (such.
COMPUTER PROGRAMMING I Essential Standard 5.02 Understand Breakpoint, Watch Window, and Try And Catch to Find Errors.
A graphical user interface (GUI) is a pictorial interface to a program. A good GUI can make programs easier to use by providing them with a consistent.
Guide to Oracle10G1 Introduction To Forms Builder Chapter 5.
A Guide to Oracle9i1 Introduction To Forms Builder Chapter 5.
Customizing Outlook. Forms Window in which you enter and view information in Outlook Outlook Form Designer The environment in which you create and customize.
1 Introduction to the Visual Studio.NET IDE Powerpoint slides modified from Deitel & Deitel.
Microsoft Visual Basic 2005 CHAPTER 8 Using Procedures and Exception Handling.
Visual Basic 2008 Express Edition The IDE. Visual Basic 2008 Express The Start Page Recent Projects Open an existing project Create a New Project.
Microsoft Office 2007 Access 2007 Chapter 9 Administering a Database System.
Programming a GUI Hanan sedaghat pisheh. For calling GUI, we need a function with no inputs or outputs First We create a m.file m file has the same name.
Microsoft Visual Basic 2012 Using Procedures and Exception Handling CHAPTER SEVEN.
Introduction to Graphical User Interfaces. Objectives * Students should understand what a procedural program is. * Students should understand what an.
An Introduction to Visual Basic
Department of Mechanical Engineering, LSUSession VII MATLAB Tutorials Session VIII Graphical User Interface using MATLAB Rajeev Madazhy
Introduction to the Graphical User Interface (GUI) in MATLAB
Matlab GUIs GUIDE.
CS 170 – INTRO TO SCIENTIFIC AND ENGINEERING PROGRAMMING.
Introduction to Visual Basic. Quick Links Windows Application Programming Event-Driven Application Becoming familiar with VB Control Objects Saving and.
Introduction to Matlab & Data Analysis
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.
GUI development with Matlab: GUI Front Panel Components 1 GUI front panel components In this section, we will look at -GUI front panel components -Programming.
Microsoft Visual Basic 2005 CHAPTER 7 Creating Web Applications.
Visual Basic.NET Comprehensive Concepts and Techniques Chapter 7 Using Menus, Common Dialogs, Procedures, Functions, and Arrays.
Copyright © 2010 Wolters Kluwer Health | Lippincott Williams & Wilkins Introduction to Windows Chapter 2.
Microsoft Visual Basic 2012 CHAPTER THREE Program Design and Coding.
Dreamweaver MX. 2 Overview of Templates n Templates represent a web page design or _______ that will be common to multiple pages. n There are two situations.
Distributed Multimedia Programming Week - 1. Document Window  The Document Window is divided in to six main components Timeline – The Timeline is where.
Introduction to Matlab’s Graphical User Interface (GUI) Type “guide” “Guide” creates interface on a Figure window and code in an M-file. Some hidden code.
function varargout = MovieJoiner(varargin) % MOVIEJOINER M-file for MovieJoiner.fig % MOVIEJOINER, by itself, creates a new MOVIEJOINER or raises the.
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.
Chapter 2 – Introduction to the Visual Studio .NET IDE
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.
Introduction to Matlab & Data Analysis 2015 In this tutorial we will: Build a practical application using GUIDE Learn more about graphical user interface.
Copyright © Curt Hill More Components Varying the input of Dev-C++ Windows Programs.
MATLAB for Engineers 4E, by Holly Moore. © 2014 Pearson Education, Inc., Upper Saddle River, NJ. All rights reserved. This material is protected by Copyright.
GUI development with Matlab: GUI Front Panel Components GUI development with Matlab: Other GUI Components 1 Other GUI components In this section, we will.
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.
Lecture (5) Programming (2) Eng. Osama Talaat 1. Announcement  M-Files are available:  Download the file from the course page
 2002 Prentice Hall. All rights reserved. 1 Chapter 2 – Introduction to the Visual Studio.NET IDE Outline 2.1Introduction 2.2Visual Studio.NET Integrated.
1 Installing Java on Your PC. Installing Java To develop Java programs on your PC: Install JDK (Java Development Kit) Add the directory where JDK was.
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.
EGR 115 Introduction to Computing for Engineers
Visual Basic.NET Comprehensive Concepts and Techniques Chapter 3 Building an Application in the Visual Basic.NET Environment.
Introduction to Matlab Module #10 Page 1 Introduction to Matlab Module #10 – Creating Graphical User Interfaces Topics 1.Overview of GUI Development using.
MATLAB and SimulinkLecture 61 To days Outline Graphical User Interface (GUI) Exercise on this days topics.
PATTERN RECOGNITION LAB 8 TA : Nouf Al-Harbi::
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.
Chapter 2: The Visual Studio.NET Development Environment Visual Basic.NET Programming: From Problem Analysis to Program Design.
Chapter 1: An Introduction to Visual Basic .NET
Chapter 2: The Visual Studio .NET Development Environment
Graphical User Interface in MATLAB
Chapter 2 – Introduction to the Visual Studio .NET IDE
An Introduction to Computers and Visual Basic
Word Tutorial 6 Using Mail Merge
1. Introduction to Visual Basic
An Introduction to Computers and Visual Basic
Using Procedures and Exception Handling
More on Graphical User Interfaces
Microsoft Word 2010 Lesson 1.
Chapter 2 – Introduction to the Visual Studio .NET IDE
CIS16 Application Development Programming with Visual Basic
Windows xp PART 1 DR.WAFAA SHRIEF.
An Introduction to Computers and Visual Basic
Prepare a DD Form 1081-Return
Visual C# - GUI and controls - 1
Presentation transcript:

Lecture (7) Introduction to GUI Eng. Osama Talaat 1

Predefined Dialogs 2 Help Dialog Warning Dialog Error Dialog

Predefined Dialogs 3 Message Box

Predefined Dialogs 4  Input Dialog:

Predefined Dialogs 5  Question Dialog:

Predefined Dialogs 6  Menu:

Predefined Dialogs 7  Wait Bar: clear all; close all; clc; waitbar(0/10,'Please wait'); for k = 1:10 pause(1) % computations here waitbar(k/10); end

Customize New GUI  Create new folder for each new GUI in the current directory and enter it.  Open the GUI Design Environment (Editor): >> guide 8

Length Converter  Insert the components from the left vertical panel.  Arrange them as you like.  Double Click any component to change its properties such as string and name.  Save and run. 9

String & Tag  Change the tag of each element to a meaningful name to be used in programming.  convert_button, m_edit, cm_edit, mm_edit, in_edit. 10

Button Callback  Program the event of button click.  Right click it >> view callbacks >> callback.  The structure handles is used to handle any element:  handles.convert_button, handles.m_edit, handles.cm_edit, handles.mm_edit, handles.in_edit  To get any element property use this function: m = get(handles.m_edit,'string'); m = str2num(get(handles.m_edit,'string'));  To set any element property use this function: set(handles.mm_edit,'string',num2str(m*1000)) 11

Button Callback % --- Executes on button press in convert_button. function convert_button_Callback(hObject, eventdata, handles) % hObject handle to convert_button (see GCBO) % eventdata reserved - to be defined in a future version of MATLAB % handles structure with handles and user data (see GUIDATA) m=str2num(get(handles.m_edit,'string')); set(handles.mm_edit,'string',num2str(m*1000)) set(handles.cm_edit,'string',num2str(m*100)) set(handles.in_edit,'string',num2str(m/0.0254)) 12

Several Source Units  Resize the window to contain the new elemnts.  Add another edit and static for the input and rearrange the layout to bring the meter into bottom.  Add a pop-up menu, with tag: unit_menu.  String it with the units in separate lines.  The index of the selected item is stored in the property ‘value’ of the pop-up menu. 13

unit=get(handles.unit_menu,'value'); in=str2num(get(handles.input_edit,'string')); if unit==1 %meter set(handles.m_edit,'string',num2str(in)) set(handles.mm_edit,'string',num2str(in*1000)) set(handles.cm_edit,'string',num2str(in*100)) set(handles.in_edit,'string',num2str(in/0.0254)) elseif unit==2 %millimeter set(handles.m_edit,'string',num2str(in/1000)) set(handles.mm_edit,'string',num2str(in)) set(handles.cm_edit,'string',num2str(in/10)) set(handles.in_edit,'string',num2str(in/25.4)) elseif unit==3 %centimeter set(handles.m_edit,'string',num2str(in/100)) set(handles.mm_edit,'string',num2str(in*10)) set(handles.cm_edit,'string',num2str(in)) set(handles.in_edit,'string',num2str(in/2.54)) elseif unit==4 %inch set(handles.m_edit,'string',num2str(in*0.0254)) set(handles.mm_edit,'string',num2str(in*25.4)) set(handles.cm_edit,'string',num2str(in*2.54)) set(handles.in_edit,'string',num2str(in)) end 14 Button Callback

BEST WISHES Eng. Osama Talaat 15