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: Naming Controls
Next Lesson: PictureButton

CommandButton

A CommandButton is used to allow the user to trigger an action. You'll probably be familiar with the OK and Cancel buttons used in standard Windows dialog boxes, allowing the user to take control of whether or not a task is to be completed.


A Window with a CommandButton

PowerBuilder allows you to pass on this functionality to your users by providing CommandButtons that can be customized, while allowing you to modify the code behind each button to perform the options that you have to offer.

CommandButton Properties Dialogbox.
CommandButton Properties Dialog Box

Typically, we write code for the clicked event ( We will explain about events after couple of sessions ) of CommandButton, i.e., we specify the action to be taken whenever the user clicks on this CommandButton. Some users are from the DOS background, they have the habit of using keyboard than the mouse, might even press Enter key. Whenever user hits the Enter key, the Clicked event script should be executed. To achieve this functionality, you need to turn on the Default property. Border of a CommandButton which has Default property turned on, would appear black and thicker.

Similarly there is one more property, Cancel. Selecting this property will execute the CommandButton's Clicked event, whenever user press Esc button. Default and Cancel properties are not exclusive. If you need to run the same code for Enter as well as Esc keys, you can turn on these properties.

One limitation of the CommandButton is that, you can't change the background color and the border.
HomePrevious Lesson: Naming Controls
Next Lesson: PictureButton

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