PFC'a tab folder consists of two objects: u_tab and u_tabpg. U_tab serves as a container for the tab pages. U_tabpg provides functionality to allow the resize service to access the controls within the tab page.
The problem with the tabpage is not unique to PFC. It is related to the nature of a native tab and tabpage controls. Once inherited, the PowerBuilder tab control behaves a lot like a visual user object. When a user object is placed on a window it cannot be modified in a window painter. Instead any changes to the user object must be done in a user object painter. When an inherited tab control is placed on a window the "insert tabpage" and "insert user object" options are disabled, because just like a user object, any changes to the control must be done in a user object painter.
Step by step instructions for using PFC's tab and tabpage controls are provided below:
For each tabpage, create a new user object, inherited from the
u_tabpg. Add all the necessary datawindows and other conrols as
well as the code directly related to the controls on the user
object. An example would be in u_dw's pfc_retrieve event: Return
This.Retrieve()
Create a new user object for the tab, inherited from u_tab. In
the user object painter from the RMB popup menu select
"Insert User Object". Select the previously created
tabpage user object and populate the appropriate properties.
Repeat for every tabpage.
Place the tab object created in step 2 on the target window.
From this point on, the tab and tabpage objects can be treated just like any other custom visual user object. You can select the level of encapsulation appropriate for your window. This will determine whether the bulk of the code will reside in a tab page user object or a parent window.
Contributed by PFCGuide staff, except
where noted otherwise.
PFCGuide is sponsored by Dynamic Technology Group.
The information provided is for advice only and not to be considered a contract or a
liability against Dynamic Technology Group.
Last revised: February 15, 2004 03:58 AM.