Realbasic 2006 User's Guide
Total Page:16
File Type:pdf, Size:1020Kb
WWWREALBASICCOM 5SERS'UIDE REALbasic 2006 User’s Guide Documentation by David Brandt. © 1999-2006 by REAL Software, Inc. All rights reserved. WASTE Text Engine © 1993-2005 Marco Piovanelli Printed in U.S.A. Mailing Address REAL Software, Inc. 1705 South Capital of Texas Highway Suite 310 Austin, TX 78746 Web Site http://www.realsoftware.com ftp Site ftp://ftp.realsoftware.com Support REALbasic Feedback at the REAL Software web site. Bugs/ Submit via REALbasic Feedback at the REAL Software Feature Requests web site. Database Plug- The REALbasic CD; the most recent versions are at ins www.realsoftware.com. Sales [email protected] Phone 512-328-REAL (7325) Fax 512-328-7372 Version 2006R1, January, 2006 Contents CHAPTER 1 Introduction . 17 Contents . 17 Welcome to REALbasic . 18 Installing REALbasic . 19 Windows Requirements. 19 Linux Requirements . 19 Macintosh Requirements . 19 Where to Begin . 19 Documentation Conventions . 20 Using the On-Line Help . 21 Searching the Online Reference . 21 Context-Sensitive Help . 22 Context-Sensitive Error Messages . 23 Using Tips . 23 Electronic Documentation . 24 Our Support Web Page . 25 End User Web Sites . 25 REALbasic Developer . 25 REALbasic third-party Books . 25 The REALbasic CD . 25 Our Internet Mailing Lists. 25 Technical Support from REAL Software . 25 Contacting REAL Software . 26 Reporting Bugs and Making Feature Requests . 26 CHAPTER 2 Getting Started with REALbasic . 27 Contents . 27 Concepts . 28 Applications are Driven by Events . 28 REALbasic User’s Guide 3 Contents Developing Software with REALbasic . 28 The Development Environment . 29 The REALbasic IDE Window. 29 The Project Editor . 31 The Window Editor . 32 The Code Editor . 35 The Menu Editor . 36 The Main Toolbar . 37 Customizing the Main Toolbar . 39 The Bookmarks Bar . 40 REALbasic IDE Menus . 41 The File Menu . 41 The Edit Menu . 43 The Project Menu . 45 The View Menu . 47 The History Menu . 48 The Bookmarks Menu . 49 The Window Menu . 50 The Help Menu . 50 Working with Projects . 51 Creating A New Project . 52 Configuring the Project Editor Toolbar . 53 Adding Items to Your Project. 55 Removing Items from Your Project. 57 The Project Editor Contextual Menu . 57 Saving Your Project . 59 Saving as XML . 59 Opening XML . 59 Creating Project Templates . 59 CHAPTER 3 Building a User Interface . 61 Contents . 62 Working with Windows. 62 Window Types . 62 Creating Windows. 74 Removing Windows . 75 Setting the Default Window . 75 Encrypting Windows . 78 Message Dialog Boxes . 79 The MsgBox function . 80 The MessageDialog Class . 80 4 REALbasic User’s Guide Contents Interacting with the User Through Controls . 84 Favorite Controls . 85 Adding, Changing, and Removing Controls . 86 Understanding Control Layers . 100 Understanding The Focus . 101 Full Keyboard Access . 106 Duplicating Controls . 108 The Object Hierarchy . 108 Button Controls for Performing Actions . 109 Controls for Displaying and Entering Text . 112 HTMLViewer . 114 Controls for Displaying and Entering Numeric Values . 115 Controls for Presenting a List of Choices . 117 Controls for Visually Grouping Other Controls . 122 Controls for Displaying Graphics and Pictures . 127 Controls for Playing Movies, Music, and Animation. 129 Miscellaneous Controls . 133 Controls for Handling Communications . 134 “Easy” Communications . 136 ToolbarItem and StandardToolbarItem . 136 The Timer . 136 Controls for Working With Databases . 136 The Spotlight Query Control . 137 ActiveX Controls. 138 The Container Control . 139 Object Binding . 141 Changing The Tab (Control) Order . 146 Aligning Controls with Other Controls. 148 Spacing Controls Evenly. 149 The Control Hierarchy. 149 Control Hierarchy Features . 152 Adding Menus and Menu Items . 154 Adding Menubars . 154 Adding Menus . 156 Adding a Help Menu . 158 Adding Menu Items . 158 Adding a Submenu . 162 Adding a Menu Item to the Mac OS Apple and Application Menus 164 Moving Menus and Menu Items . 165 Removing Menu Items . 165 Adding A Menu Item Separator . 165 Menu Item Arrays . 165 REALbasic User’s Guide 5 Contents Importing and Exporting Menus . 166 User Interface Guidelines . 167 CHAPTER 4 BASIC Programming Concepts . 169 Contents . 169 BASIC versus REALbasic . 170 Storing Values in Properties and Variables . 171 What are Properties? . 171 Variables . 171 Data Types . 171 Changing a Value From One Data Type to Another. 175 Assigning Values to Properties . 175 Getting Values From Properties . 178 Getting and Setting Values in Variables . 178 Declaring Objects . 182 Using Arrays . ..