From Lianjapedia
Jump to: navigation, search

Note: property, method and event names should be referred to in lowercase in case-sensitive scripting languages.


Shown below in a standalone Form. Click the image to see in a Custom Section in a Lianja Page.

Page, Pageframe

Creates a page frame to contain Page objects.

A page frame is a container object that contains pages, which can contain containers and controls.

The page frame defines global characteristics of the page: size and positioning, border style, which page is active, and so on. The page frame determines the location of the pages and how much of each page is visible. Pages are positioned at the top left corner of the page frame. If the page frame is moved, the pages move with the page frame.

A page frame contains individual pages that are named Page1, Page2, Page3, and so on by default.


This class supports the Common Properties plus the following:

Property Access (R/RW) Value Description
ActivePage RW Numeric Index of the selected page, starting from 0, left to right
Closable RW Boolean Whether individual tabs have a close button (x)
PageCount RW Numeric Number of pages in the pageframe.
Tabs RW Boolean Whether the tab bar is displayed
Tabposition RW Character Defines the position of the tabbar: 'north', 'south', 'east' or 'west'


This class supports the Common Methods plus the following:

Method Args Description
AddObject existing as Object | newobject as Character, class as Character Add an existing object or a new object, in which case the object's class must also be specified
Removeobject existing as Object Remove the specified object


This class supports the Common Events plus the following:

Event Args Description



// VFP custom section for page "page1" section "section1"
namespace rectabs
public pageframe1, tab0, tab1, tab2
define class page1_section1 as section
define class tabbutton as CommandButton 
proc click
	do case
		case upper( = "TABBUTTON1"
			pageframe1.activepage = 1
		case upper( = "TABBUTTON2"
			pageframe1.activepage = 2
		case upper( = "TABBUTTON3"
		case upper( = "TABBUTTON4"
			pageframe1.closable = not pageframe1.closable
		case upper( = "TABBUTTON5"
			pageframe1.tabs = not pageframe1.tabs
		case upper( = "TABBUTTON6"
			if pageframe1.pagecount = 3
				tab2.caption = "Tab2"
				tab2.backcolor = "green"
proc page1_section1 
	page1_section1 = createobject("page1_section1")
	page1_section1.addobject("pageframe1", "pageframe")
	pageframe1.addobject("tab0", "page")
	tab0.layout = 3
	tab0.picture = ":/images/recital_background"
	tab0.caption = "Tab0"
	tab0.addobject("tabbutton1", "tabbutton")
	tabbutton1.caption = "Select Tab1"
	tab0.addobject("tabbutton2", "tabbutton")
	tabbutton2.caption = "Select Tab2"
	tab0.addobject("tabbutton3", "tabbutton")
	tabbutton3.caption = "Display Pagecount"
	tab0.addobject("tabbutton4", "tabbutton")
	tabbutton4.caption = "Toggle closable tabs"
	tab0.addobject("tabbutton5", "tabbutton")
	tabbutton5.caption = "Toggle tab bar"
	tab0.addobject("tabbutton6", "tabbutton")
	tabbutton6.caption = "Add/remove tab"
	pageframe1.addobject("tab1", "page")
	tab1.caption = "Tab1"
	tab1.backcolor = "red"
	pageframe1.addobject("tab2", "page")
	tab2.caption = "Tab2"
	tab2.backcolor = "blue"
return page1_section1