Hyderabad Jobs Book Website FREE PowerBuilder Training I Love Hyderabad Hyderabad Colleges
Home Business Emails Hyderabad Classifieds Contact Us
7 Wonders of Hyderabad Web Hosting Yellow Pages Our Network

 
Webpowerbuilder.hyderabad-colleges.com

Introduction to PowerBuilder

HomePrevious Lesson: Creating a Window
Next Lesson: SingleLineEdit Control

Window Controls

In addition to the StaticText control, the following controls are also available:

SingleLineEdit PictureListBox RichTextEdit
MultiLineEdit DropDownPictureListBox Picture
EditMask ListView DataWindow Control
CommandButton TreeView UserObject
PictureButton CheckBox OLE Control
ListBox RadioButton Vertical Scrollbar
DropDownListBox GroupBox Horizontal Scrollbar
Tab Control Line Rectangle
RoundRectangle Oval Graph

Each control has certain properties, such as border, foreground color, name, etc. Once you place a control in the Window Workspace, you can change the control properties either:
By clicking with the right mouse-button on the control and selecting "Properties" option from the popup menu. (OR)
By selecting the control (To select the control, click on the control), then, select "Edit/Properties" from the menu.
By double-clicking on the control.

The following picture is the "Properties tab object" for the StaticText control.

Image of Properties Dialog box for "StaticText" control.
StaticText Control Properties Dialog Box.

The value you specify for "Text" attribute is the text that it displays on the "StaticText" control; that is what the user sees. The default value for this is "none'. For this example, change this to: "Enter Name:", without quotes.

Each control has a name. The 'Name' property allows you to refer to that control in the script. (We will explain naming conventions in a moment). Change the name to "st_name", without quotes. Users don't see the name, it is meant for the programmer to refer in the script.

Visible: By default this property is checked-off, Otherwise, users can't see this control even though it is on the window.

Enabled: This property is not checked by default. If this property is not set, nothing will happen when the user clicks on this control. Users can't tab onto this control when this property is not checked.

Focus Rectangle: By default this option is not checked-off. If you do so, PowerBuilder displays a rectangle around the control. The control gets focus when the user either tabs onto the control or clicks on it with the mouse button.

You can choose from four borders, 3D raised, 3D lowered, Box and Shadow box. The Align option aligns the text you provided for the Text property.

You can select the text font properties by clicking Font tab and choosing the appropriate option. You can choose where you want to display the control, but we won't recommend choosing the x, y co-ordinates from this dialog box; instead click on the control and drag it to the correct position and resize it.

Pointer: By default, when you move the mouse pointer over the StaticText control, you will see the standard icon. The standard mouse pointer might be different on your computer; it depends on the pointer you select in the Windows setup. Typically, the pointer is an arrow. If you would like to display a different mouse pointer whenever user moves the mouse pointer over the control you just painted, you can do so by clicking on the Pointer tab. We will explain how to preview the window you are painting in a moment; you can test this property at that time.

We will explain about drag-and-drop in the coming sessions.

Accelerator Keys: When there are lot of controls in the window and when the user wants to jump from one control to another, he can either keep pressing tab till he reaches the control he wants to reach OR he can click with the mouse-button directly on the control. Remember, there is a large community out there who are from DOS world and still use keyboard most of the time. If they want to reach the last control in the window while the focus is at the top, pressing tab keys would be pretty tiresome.

We can provide hot keys, by which they can jump to the controls directly by pressing them, no matter where the cursor is. In PowerBuilder, these hot keys are called as Accelerator Keys. User presses them in combination with the "Alt" key. To specify an accelerator key, you need to prefix the key with an ampersand (&). If you want "n" as an accelerator key for "Enter your name:", you need to type "Enter your &name:". The case of the accelerator key doesn't matter.

Please note that StaticTexts have no accelerator keys since we won't expect the user to do anything on the StaticText control itself. Other controls have accelerator keys but, there is a problem of displaying the accelerator keys to the user. You will learn more about them in the "SingleLineEdit" control.

Right to Left: In version 6.0, this property allows you to display text from right to left (opposite to the normal display). This property is good when you develop PowerBuilder applications for Arabic, Hebrew language users. The computers operating system should also be of that language version, otherwise this property has no effect.

 
HomePrevious Lesson: Creating a Window
Next Lesson: SingleLineEdit Control

Copyright © 1996 - 2006 HamaraShehar.com Pvt. Ltd. All Rights Reserved.
Domain Registration, Website Design, Website Hosting by HamaraShehar.com