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: Defining Tag Values
Next Lesson: Types of Windows

Window Properties

We've looked at all the controls available in a window and properties for each control and seen how to manipulate these controls on a window. However, the window itself has certain properties. To see the properties of the window, click with the right mouse-button in the windows workspace (the space that is not occupied by any control in the workspace) and select "Properties" option.

You might have observed that till now, when you do the window preview, "Untitled" is being shown in the window title. You can change the window title in the "Title" prompt.

Each window can have a menu associated with it. For example, while painting a window, you are in the Window painter; you see a menu at the top and a toolbar (Painterbar) associated with the menu. The term "associated" means that the options in the menu have a corresponding toolbar icon in the Painterbar. Similarly, you can paint a menu (We will explain in the next session) and associate that menu to any window you want. A menu can be associated with any number of Windows, where as a Window can have only one menu associated with it. (You can't associate a menu at this moment, since we didn't paint a menu yet.) Whenever you open the window at run-time, the menu will be automatically displayed.

Standard window (Under MS-Windows) properties such as "Maximize Box", "Minimize Box", "Resizable property" can be turned on/off. All the above properties are independent of each other. When you want to turn on/off depends on the application requirement. Depending on the window type (we are going to explain types of windows in a moment), some of the window properties are not editable.

The following table lists Window types and properties. If nothing is mentioned in the table it means that you can turn the property to either True or False.
Property/Window Type Main Child Popup Response MDI Frame MDI Frame with Microhelp
Border Always On     Always On Always On Always On
Titlebar Always On       Always On Always On
Maximize box            
Resizable   Can't have        
Minimize box            
Control Menu   Can't have        
Menu Name         You must provide at design time You must provide at design time

Window Color

You can specify a color for the window itself. By default, the color of the window is "Window Background". We know that the sentence is a bit confusing. To get out of the confusion, we need to explain some MS-windows color theory.

All system windows and applications that follow MS-Window's standards use MS-Window's system colors. You can view/change system colors from the "colors" option in the Control Panel.

Here you can specify what window's background color should, what color the window title should have, what colors enabled/disabled menu options should have and so on.

Coming back to "Window Background", if you select any color other than this, the end user will always see the color you specify. Please note that some users may not like the colors you defined or some users may be color blind. That is one of the reasons why users start disliking the system.

If you select the window color as "Window Background", the color of the window you painted would be the color they specify in the Control panel. That means every user can have the color they want.

For example, the "Window background" is defined as "Gray" on your system. You develop and deploy the application. The window color won't be guaranteed to be "gray". The window color on the user machine would be the color he defines as "Window Background" color in the control panel on his machine.

Window Size and Position

The X and Y values specify the position of the top left-hand corner of the window. Changing them would be useful for child and popup windows but you also need to change them at run-time. So, just leave them to the defaults and change them at run-time only.

The size and height of the window can be changed from this dialog box. However, we don't see any need for changing this property from this dialog box; you can as well grab the edge of the window and drag it to the required size and position.

You can choose how to open the window: maximized, minimized or normal size. The initial position of the window when it is open would be in the position you specify.

The scrolling options allow you to specify how the standard Windows scrollbars should work. The defaults are as follows:
Scrollbar Default Value
Horizontal Units Per Scroll Columns 0 - 1/100th of the width of the window
  Scroll Columns Per Page 0 - 10 columns
Vertical Units Per Scroll Line 0 - 1/100th of the height of the window
  Scroll Lines Per Page 0 - 10 lines
HomePrevious Lesson: Defining Tag Values
Next Lesson: Types of Windows

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