PML Customisation
User Guide
Gadget Set
:
Frame Gadgets
: Managing Pages in Tabset Frames
Managing Pages in Tabset Frames
Within a Tabset frame, whenever you interactively select a new tab a HIDDEN event is raised for the previous tabbed page frame and then a SHOWN event is raised for the new one, which pops to the front. The HIDDEN and SHOWN callbacks are only executed for tabbed page frames which provide an Open callback.
If you want to manage tabbed pages that are also radio groups, then you must supply an open callback so you can differentiate the
SELECT
(
RTOGGLE
) event and the (page)
SHOWN
event.
Setting a tabbed page frame's VISIBLE property, e.g.
!this.TabbedPage.visible = true
, selects it and gives it focus, but does not raise HIDDEN or SHOWN events.
The example below shows a typical form method you could use as a PML open callback to handle frame events for any frame gadgets defined on a form:
define method .frameEvents(!frame is GADGET, !event is
STRING)
-- Frame events open callback handler
if( !event eq 'SELECT' ) then
--Handle radio button selection
!selection = !frame.val
...
elseif( !event eq 'SHOWN' ) then
-- tabbed page selected
-- modify page content
...
endif
endmethod
1974 to current year.
AVEVA Solutions Limited and its subsidiaries. All rights reserved.