Page 1 of 1

CreateDialog - custom gadget - Runtime Procedure

Posted: Sun Jun 14, 2015 1:45 pm
by eddy
Hi,

I wonder if it's possible to support custom gadget. (like TabBarGadget)

Code: Select all

Define xml$="<window id='#win' name='test' text='Dock Panel' minwidth='200' minheight='300' width='200' height='300' " + 
            "   flags='#PB_Window_ScreenCentered | #PB_Window_SystemMenu | #PB_Window_SizeGadget | #PB_Window_MinimizeGadget | #PB_Window_MaximizeGadget'>" + 
            "     <tabbar id='#Toolbar' margin='0' spacing='0' />" + 
            "        <tab text='First tab' image='#photo' />" + 
            "        <tab text='Second tab' image='#logo' />" + 
            "     </tabbar>" + 
            "</window>"
The sipmle way is to used Runtime Procedure named with postfix 'Gadget'.

Code: Select all

Runtime Procedure.i TabBarGadget(Id, Map Attribute.s(), ContentXML.s)
   ;* Attribute  => retrieves all tag attributes    name,x,y,width,height,etc...
   ;* ContentXML => retrieves inner xml tags        <tab text='First tab' / >... <tab />
   result=CreateGaget(Id, ....)
   ProcedureReturn result
EndProcedure