-
scrollarea
The scrollarea can give you an area bigger than the screen space by adding scrollbars when the page is bigger than the given space. The scrollarea holds just one element, the page element.
{ 'type' : 'scrollarea', 'name' : 'mainarea', 'dragdrop' : '@dodrop(@me)', 'minheight' : 200, 'stretch' : True, 'page' : '@getscrollpage()', }
The scrollarea inherits all parameters supported by guiwidget and frame.
'page' The page contained in the scrollara. 'autoresize' Set auto resize page to on. 'alignment' Align the page inside the scroll area.Support one or more with | as separator of 'left', 'right', 'center', 'top', 'bottom', 'justify', 'hcenter', 'vcenter' or 'absolute' 'ondoneloading' Action to run when page done loading 'hscrollbarpolicy' support the parameters as-needed, always-on and always-off 'vscrollbarpolicy' support the parameters as-needed, always-on and always-off Support methods
The object inherits all support methods found in the GUIContextObject but also have it's own.
replace
You can replace the page content by code using the replace method.
self.mainarea=self.proxy.getnamedelement('mainarea') self.mainarea.replace(page=self.getscrollpage(),ctx=self.proxy)
This replaces the page with new dynamically created in the getscrollpage method.
Replace the current page element with a new one based on the following named parameters:
page - a page that can be set direct either as the form def dictionary or a loaded page
name - to be used for title
form - the name of a form definition that needs to be loaded from file
ctx - the contents used by the page