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: Course 1:: Session 4 :: Page 450
Next Lesson: Menu Painter

Window Painter - Exercises

All the windows that you paint as part of this exercise will be used in applications you develop in future sessions. So, we recommend you NOT to skip this exercise. You need to paint windows as shown in the picture. The details of each element in the picture are described below it.
Note: Use the downloaded files for verification only. We strongly suggest you to do all the exercises.

After completion of these exercises, if you have any problem or want to make sure that your home work is correct, you can download objects by clicking on the appropriate "Download Code" icon. Please note that, all these window names are suffixed with "_asi". To open these objects, you need to import them into your PowerBuilder library. To import the file, invoke the library painter, select "Entry/Import" from the menu and select the downloaded file name. Now, the object is ready in your library.

 

Login Window (w_login)

Image of w_login window
Picture of w_login window

Window Properties for w_login window:

Property Value
Title: Login Information
Window Color: Window Background
Window Type: Response
Window Name: w_login

Controls left side Top-to-Bottom for w_login window:

Control Type Name Properties
StaticText st_name Text: "Enter your Login &Name:"
StaticText st_password Text: "&Password:"
StaticText st_dbms Text: "Database &Vendor:"
StaticText st_server Text: "&Server Name:"
StaticText st_database Text: "&Database Name:"
CommandButton cb_ok Text: "OK"
Turn on "Default" property
Tab Order: 60
Tag: "Either hit Enter key or click this button to validate your login."

Controls right side Top-to-Bottom in w_login window:

Control Type Name Properties
SingleLineEdit sle_name Turn-on AutoHScroll
Accelerator: "N"
Limit: 32
Case: Any
Border: Box
Tab Order: 10
Tag: "Enter Login name. Login name is case sensitive. Check your CapsLock."
SingleLineEdit sle_password Turn-on AutoHScroll
Accelerator: "P"
Limit: 32
Case: Any
Border: Box
Turn-on Password property
Tab Order: 20
Tag: "Enter Password. Password is case sensitive. Check your CapsLock."
SingleLineEdit sle_dbms Turn-on AutoHScroll
Accelerator: "V"
Case: Any
Border: Box
Tab Order: 30
Tag: "Enter Database vendor name. Enter "ODBC", if you want to use ODBC driver."
SingleLineEdit sle_server Turn-on AutoHScroll
Accelerator: "S"
Case: Any
Border: Box
Tab Order: 40
Tag: "Enter Server name."
SingleLineEdit sle_database Turn-on AutoHScroll
Accelerator: "D"
Case: Any
Border: Box
Tab Order: 50
Tag: "Enter Database name."
CommandButton cb_cancel Text: "&Cancel"
Turn on "Cancel" property
Tab Order: 70
Tag: "Click or Press Esc key, to cancel Login and to exit the application."

The bottom most control is a StaticText control. Name it as "st_help". Value of text is: "Ready". For all StaticText controls, select background color as "Window Background" color (Marked as "W" on the toolbar icon).

w_error window
Picture of w_error window

Window Properties

Property Value
Title Error Information
Window Color Window Background
Type Response

The top control is a "DataWindow" control. Name it as "dw_error". Turn on horizontal and vertical scrollbars.

The bottom four controls are CommandButtons. From left to right,  cb_print, cb_save_to_log, cb_continue and cb_abort. The text for the CommandButtons are "&Print", "&Save", "&Continue", "&Abort" in the same order. Save this window as "w_error".

A Full-featured window (w_product_master)

w_product_master window
Picture of w_product_master Window

Window Properties for w_product_master window

Property Value
Title Product Master Maintenance
Window Color Window Background
Type Main

Left most control is a DataWindow control. Name it as "dw_product". Just below that, there is one more control, which is hidden. That is also a DataWindow control, just like "dw_product". Name it as "dw_query". All controls that are on the right side are CommandButtons. The names of these CommandButtons from top are: cb_query, cb_retrieve, cb_add, cb_delete, cb_save, cb_export, cb_sort, cb_filter, cb_print_preview, cb_printer_setup, cb_print and cb_close. The text values are on the picture. Save this window as "w_product_master".

w_about window
Picture of w_about window

Window Properties for w_about window

Property Value
Title: (Disable Titlebar)
Window Color: Window Background
Window Type: Response

Left Top control is a "Picture". Assign your company logo's bitmap. Name it as "p_logo". The next two controls are StaticText controls. Provide your company name over there.

The bottom four controls are CommandButtons, cb_copyright_info, cb_system_info, cb_credits and cb_done. Turn on both "Default" and "Cancel" properties for cb_done CommandButton. Save this window as "w_about".
HomePrevious Lesson: Course 1:: Session 4 :: Page 450
Next Lesson: Menu Painter

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