Here is a quick copy/paste of our internal header, it should help you to get started:
DialogError() can be used to investigate error when creating the XML dialogs.
Code: Select all
Accepted keys in the XML by all objects:
width = specify a minimum dimension for the particular object
height
text = literal string for display
id = Constant used for Gadget/WindowID. (PB_Any is used if not set)
flags = extra gadget/window flags to set
name = name tag to know a gadget with Dialog\Gadget(Name)
invisible = yes/no (default) - only for real gadgets/windows
disabled = yes/no (default) - only for real gadgets/windows
onevent="ProcedureName()" ; needs to be a "Runtime" procedure
and for gadget which support and eventtype, it can be specified like this:
onchange="OnChange()"
onfocus="OnFocus()"
etc. The name is the same than the #PB_EventType_<Name>
-------------------------------------------------------------------------------------
Shared functions for objects with one child. This is no object on its own
Used by: window, container
Accepted keys in the XML:
margin = margin around the content (default = 10)
can be a single number (= all margin), or a combination of
top:<num>,left:<num>,right:<num>,bottom:<num>,vertical:<num>,horizontal:<num>
example: "vertical:5,left:10,right:0"
expand = yes - expand child to fill all space (default)
no - no expanding
vertical - expand vertically only
horizontal - expand horizontally only
expandwidth = max size to expand the children to. If the requested size is larger than
expandheight this setting then the request size is used (ie the content does not get smaller)
default=0
align = combination of top,left,bottom,right and center. (only effective when expand <> yes)
example: "top,center" or "top,left" (default)
-------------------------------------------------------------------------------------
vbox, hbox
Accepted keys in the XML:
spacing = space to add between the packed childs (default=5)
expand = yes - items get bigger to fill all space (default)
no - do not expand to fill all space
equal - force equal sized items
item:<number> - expand only one item if space is available
align = top/left - only applied when expand="no", top/left is the default
center
bottom/right
-------------------------------------------------------------------------------------
button, checkbox, option, listview, combobox, text, string
Accepted keys in the XML:
only the default options
for ComboBox:
boxheight = size of the dropdown Box (Default=200)
for scrollbar:
min, max, page
Note: A ListIcon is created with 1 column, but if <column> is used, the default column is removed
-------------------------------------------------------------------------------------
gridbox - align elements in a table
Accepted keys in the XML:
columns = number of columns (default = 2)
colspacing = space to add between columns/rows (default = 5)
rowspacing
colexpand = yes - items get bigger to fill all space
rowexpand no - do not expand to fill all space
equal - force equal sized items
item:<number> - expand only one item if space is available
for colexpand, Default=yes, For rowexpand, Default=no
Any child within a gridbox can have these keys:
colspan = number of columns to span (default = 1)
rowspan = number of rows to span
-------------------------------------------------------------------------------------
multibox
A box with multiple childs in the same position. Used to put multiple containers
inside and show only one of them at a time.
Accepted keys in the XML:
only the default options
-------------------------------------------------------------------------------------
panel - panel gadget
The direct childs of a Panel must be "Tab" items, which are containers for the real gadgets
Accepted keys in the XML:
-------------------------------------------------------------------------------------
tab - PanelGadget childs
Accepted keys in the XML:
All accepted by DlgBinBase
-------------------------------------------------------------------------------------
scrollarea - ScrollAreaGadget()
Accepted keys in the XML:
All accepted by DlgBinBase
The Childs will always get the size they ask for, exept if scrolling is set to one
direction only and the gadget cannot grow.
innerheight = inner minimal height (-1 = do not change)
innerwidth = inner minimal width (-1 = do not change)
step = scrollstep value (default = 10)
scrolling = horizontal/vertical/both (default)
force only one direction to be scrollable. the gadget will try to grow big
enough to show all content in the other direction
-------------------------------------------------------------------------------------
singlebox
A box with just one child. Used only to apply extra margin/alignment properties to a child.
Its called a box (as all virtual containers are called that), but it extends DlgBinBase,
because these are the properties we want.
Accepted keys in the XML:
all single container options
-------------------------------------------------------------------------------------
splitter - SplitterGadget()
Accepted keys in the XML:
firstmin = pixel value or "request" (default)
secondmin
If firstmin or secondmin is set, they will be set for the gadget, if they are not set
(or to "request"), the minimum will be the size request of the child.
Note: The vertical mode is determined by the flags parameter
-------------------------------------------------------------------------------------
window
Accepted keys in the XML:
All accepted by DlgBinBase
forcesize = yes/no (default)
If the window is resizable, do not allow resizing below the
requested minimum size
closebutton = yes (default)/no
The default is to have the #PB_Window_SystemMenu flag on all dialogs
use this to remove it