Working with Windows

This part describes how to create windows for your application. It covers the properties of windows, the controls you can place in windows, how to use inheritance to save time and effort, and how to define menus. It also introduces user objects.

Table of Contents

Working with Windows
About windows
Designing windows
Building windows
Types of windows
Main windows
Pop-up windows
Child windows
Response windows
MDI frames
About the Window painter
Building a new window
Creating a new window
Defining the window's properties
Adding controls
Adding nonvisual objects
Saving the window
Viewing your work
Previewing a window
Printing a window's definition
Writing scripts in windows
About events for windows and controls
About functions for windows and controls
About properties of windows and controls
Declaring instance variables
Examples of statements
Running a window
Using inheritance to build a window
Building two windows with similar definitions
Advantages of using inheritance
Instance variables in descendants
Control names in descendants
Working with Controls
About controls
Inserting controls in a window
Selecting controls
Defining a control's properties
Naming controls
About the default prefixes
Changing the name
Changing text
How text size is stored
Moving and resizing controls
Moving and resizing controls using the mouse
Moving and resizing controls using the keyboard
Aligning controls using the grid
Aligning controls with each other
Equalizing the space between controls
Equalizing the size of controls
Copying controls
Defining the tab order
Establishing the default tab order
Changing the window's tab order
Defining accelerator keys
Specifying accessibility of controls
Using the Visible property
Using the Enabled property
Choosing colors
Using the 3D look
Using the individual controls
CommandButton
PictureButton
CheckBox
RadioButton
StaticText
StaticHyperLink
Picture
PictureHyperLink
GroupBox
Drawing controls
SingleLineEdit and MultiLineEdit
EditMask
HScrollBar and VScrollBar
HTrackBar and VTrackBar
HProgressBar and VProgressBar
DropDownListBox
DropDownPictureListBox
ListBox
PictureListBox
ListView
TreeView
Tab
MonthCalendar
DatePicker
Animation
InkEdit and InkPicture
Understanding Inheritance
About inheritance
Creating new objects using inheritance
The inheritance hierarchy
Browsing the class hierarchy
Working with inherited objects
Using inherited scripts
Viewing inherited scripts
Extending a script
Overriding a script
Calling an ancestor script
Calling an ancestor function
Working with RibbonBar
Introduction to RibbonBar items
Creating a RibbonBar using RibbonBar Builder
Using the RibbonBar Builder
Creating a valid structure
Accessing the RibbonBar items in the hierarchy
Tutorial: How to Replace an Application Menu with a RibbonBar
Overview
Prerequisites
Design and create a RibbonBar
Add the RibbonBar to the application
Initiate the RibbonBar
Define and bind user events with RibbonBar items
Associate functions with RibbonBar items
Summary notes
Working with WebBrowser
What can WebBrowser support?
Configuring WebBrowser
Packaging WebBrowser
WebBrowser control vs. Microsoft Web Browser OLE control
Working with Menus and Toolbars
Menus and menu items
Using the Menu painter
Menu painter views
Menu styles
Building a new menu
Creating a new menu
Working with menu items
Saving the menu
Defining the appearance and behavior of menu items
Setting General properties for menu items
Setting menu style properties for contemporary menus
Setting menu item style properties
Providing toolbars
How toolbars work
Adding toolbars to a window
Selecting a toolbar style
Setting toolbar properties
Setting toolbar properties in the Window painter
Setting toolbar properties in the Application painter
Writing scripts for menu items
Menu item events
Using functions and variables
Referring to objects in your application
Using inheritance to build a menu
Using the inherited information
Inserting menu items in a descendant menu
Using menus in your applications
Adding a menu bar to a window
Displaying pop-up menus
Working with User Objects
About user objects
Class user objects
Visual user objects
Building user objects
About the User Object painter
Building a new user object
Creating a new user object
Building a custom class user object
Building a standard class user object
Building a custom visual user object
Building an external visual user object
Building a standard visual user object
Events in user objects
Saving a user object
Using inheritance to build user objects
Using the inherited information
Using user objects
Using visual user objects
Using class user objects
Using global standard class user objects
Communicating between a window and a user object
Examples of user object controls affecting a window