Getting a dialog to have spacing='0'
Posted: Tue May 27, 2025 4:27 pm
Try this window with a container that shall have spacing='0' but has spacing='5' (default) instead.
What to do? Something wrong? 
Code: Select all
; Trying to fill the window with this gray container, but spacing shall be 0.
define *xml
define *dialog
define xmlScript$
xmlScript$ = "<window id='#pb_any' name='' x='0' y='0' width='320' height='200' text='fill-out container?' flags='#PB_Window_SizeGadget|#PB_Window_MaximizeGadget|#PB_Window_MinimizeGadget'>" +
"<hbox spacing='0' expand='yes'>" +
"<vbox spacing='0' expand='yes'>" +
"<container spacing='0' id='#pb_any' name='cont' />" +
"</vbox>" +
"</hbox>" +
"</window>"
*xml = catchXml ( #pb_any,
@ xmlScript$,
stringByteLength ( xmlScript$ ) )
*dialog = createDialog ( #pb_any )
if ( ( *xml ) and
( isXml ( *xml ) ) and
( xmlStatus ( *xml ) = #pb_xml_success ) and
( *dialog ) and
( isDialog ( *dialog ) ) and
( openXmlDialog ( *dialog,
*xml,
"",
#pb_ignore,
#pb_ignore ) ) )
setGadgetColor ( dialogGadget ( *dialog,
"cont" ),
#pb_gadget_backColor,
rGB ( 191,
191,
191 ) )
repeat
if ( waitWindowEvent ( ) = #pb_event_closeWindow )
end
endIf
forEver
endIf
; es_91 - 2025
