Having XML dialog structure to be a rendering within the container gadget (not a window) with the same behaviour as if it was a window.
Rationale:
This could simplify creation of application windows.
XMLdialog renders in predefined Window enclosure. There may be more than one dialog in the same XML each with its own window.
But it will be interesting to have something along this example :
(of course this code do not work )
Code: Select all
If OpenWindow( 0, 0, 0, 500, 500, "render in containers")
container1 = ContainerGadget( #PB_Any, 0, 0, 250, 500)
XML1$ = " <vbox>" +
" <hbox>" +
" <option name='visible' text='Visible' group='1'/>" +
" <option name='invisible' text='Invisible' group='1'/>" +
" </hbox>" +
" <text name='lbl1' text='Field Name'/>" +
" <string name='fieldName' width='50' height='30'/>" +
" <text name='lbl2' text='Field text'/>" +
" <string name='fieldValue' width='50' height='30'/>" +
" <hbox>" +
" <vbox>" +
" <text name='lbl3' text='Column'/>" +
" <string name='column' width='20' height='30'/>" +
" </vbox>" +
" <vbox>" +
" <text name='lbl4' text='Row'/>" +
" <string name='row' width='20' height='30'/>" +
" </vbox>" +
" </hbox>" +
" <hbox>" +
" <button name='ok' text='Save/Close' height='30' />" +
" <button name='cancel' text='Cancel/Close'/>" +
" </hbox>" +
" </vbox>"
XMLrender(#render1id, XML1$, #enclosureXXX, container1)
CloseGadgetList()
container2 = ContainerGadget( #PB_Any, 250, 0, 500, 500)
XML2$= ....
XMLrender(#render2id, XML1$, "otherid",container2) ; otherid to be string or id 'number'
CloseGadgetList()
...
Code: Select all
<XMLchunks>
<enclosure id=xxx name=xxx>
<vbox>
....
</vbox>
</enclosure>
<enclosure id=otherid name=other name>
</enclosure>
</XMLchunks>