Window Types
Main window
A standalone window that can be independent of all other windows. You use the main window as the anchor for your application. The first window your application opens is a main window (unless you are building an MDI application, in which case the first window is an MDI frame).
Popup window
A window that displays only in response to an event within a window but can exist outside the window and, in some cases, after the window that opened it is closed.
The popup window may or may not have a parent window. When it has a parent window, it is dependent. The popup is hidden when the parent is minimized and visible when the parent is maximized (it is never overlapped by the parent). When the popup window does not have a parent, it is independent and can be overlapped by the window that opened it. When you minimize a popup window, the icon for the popup displays outside the window (regardless of whether it has a parent).
Child window
A window that is dependent on a main (parent) window and can exist only within the parent window. The initial position of the child is relative to the parent and not to the workspace. You can move the child within the parent, but not outside the parent.
When you move part of the child beyond the parent, PowerBuilder clips the window so that only the portion within the parent is visible. When you move the parent window, the child moves with the parent and maintains the same position relative to the parent.
When you minimize a child window, the icon displays within the parent.
Response Window
The window that displays to request information from the user and to which the user must respond. A response window is always opened from within another window (its parent). Typically, a response window is opened after a specific event occurs in the parent window.
A response window is application modal: when it displays, it is the active window (it has focus) and no other window in the application is accessible until the user responds to it. The user can go to other Windows applications; but when the user returns to the application, the response window is still active.
A response window acts like a modal popup window.
Open Event Sequence
Here is the order windows events fire
Main Window
- Open
- Activate
- Show
- Resize
MDI Sheet
- Open
- Resize
- Show
- Activate
Tab Object
Selection Changing Event
Return Values:
0 – Allow the selection to change
1 – Prevent the selection from changing
How do I select a particular tabpage in script?
tab_1.SelectTab(3)
tab_1.SelectTab(tab_1.uo_3)
The tab identifier can be
· The tab page index (an integer)·
· The name of the user object (data type DragObject or UserObject)
· A string holding the name of the user object
Rich Text Edit
A rich text edit control is generally more sophisticated than a rich text DataWindow.
· Capable of insert, edit and delete of input fields dynamically
· Can save as RTF file
· Multiple undo processing
How do I create?
- Drop control and set properties
- Provide methods to insert the text. Inserting text can be done manually or programmatically.
- Prove methods to place input fields. The InputFieldInsert function is used. Column name must match DataWindow column name.
- Provide methods to merge the data with DataStore.
How do I load the rich text edit control programmatically?
1) Use the InsertDocument( ) function. A true will replace existing document, false will append.
Rte_1.InsertDocument(“mydoc.rtf”, true)
2) Use the SelectText( ) function to position text?
Rte_1.SelectText(3,1,0,0)
Rte_1.InputFieldInsert(“company_name”)
-
Archives
- August 2009 (2)
- May 2009 (1)
- March 2009 (1)
- January 2009 (2)
- December 2008 (1)
- November 2008 (2)
- September 2008 (1)
- August 2008 (1)
- July 2008 (24)
- June 2008 (22)
- May 2008 (69)
- April 2008 (25)
-
Categories
-
RSS
Entries RSS
Comments RSS