I want an imagebutton sizing 9x9.
i've tried with gridbox, other boxes + empty, but nothing works.
[Edit: oops]
Code: Select all
;
;/-------------------------
;|
;| Names, IDs, Procedures
;|
;| Example Template for Dialog Design0R
;|
;/-------------------------
#DD_WindowCount = 1
#DD_UseExtraStuff = 0
CompilerIf #DD_UseExtraStuff
XIncludeFile ""
CompilerEndIf
Runtime Enumeration Windows
#window
EndEnumeration
Global Dim DD_WindowNames.s(#DD_WindowCount)
DD_WindowNames(1) = "window"
Runtime Enumeration Gadgets
#text_1
#buttonimage_1
#tree_1
EndEnumeration
Procedure.s GetXMLString()
Protected XML$
XML$ + "<?xml version='1.0' encoding='UTF-16'?>"
XML$ + ""
XML$ + "<dialogs><!--Created by Dialog Design0R V1.85 => get it from: https://hex0rs.coderbu.de/en/sdm_downloads/dialogdesign0r/-->"
XML$ + " <window flags='#PB_Window_SystemMenu | #PB_Window_MinimizeGadget | #PB_Window_MaximizeGadget | #PB_Window_SizeGadget | #PB_Window_ScreenCentered' width='800' height='600' margin='vertical:0,horizontal:0' name='window' xpos='104' ypos='104' id='#window'>"
XML$ + " <vbox expand='item:2' spacing='0'>"
XML$ + " <hbox expand='item:2' height='10'>"
XML$ + " <singlebox>"
XML$ + " <text text='Text' id='#text_1'/>"
XML$ + " </singlebox>"
XML$ + " <empty/>"
XML$ + " <buttonimage width='9' height='9' id='#buttonimage_1'/>"
XML$ + " </hbox>"
XML$ + " <tree id='#tree_1'/>"
XML$ + " </vbox>"
XML$ + " </window>"
XML$ + "</dialogs><!--DDesign0R Definition: PureBasic|1|1|1|_|-|1-->"
XML$ + ""
ProcedureReturn XML$
EndProcedure
;Test it
CompilerIf #PB_Compiler_IsMainFile
CompilerIf Defined(GetXMLString, #PB_Procedure)
a$ = GetXMLString()
ParseXML(0, a$)
CompilerElse
LoadXML(0, Left(#PB_Compiler_File, Len(#PB_Compiler_File) - 7))
CompilerEndIf
If XMLStatus(0) = #PB_XML_Success
For i = 1 To #DD_WindowCount
CreateDialog(i)
CompilerIf #DD_UseExtraStuff
R = DEX::InitDialog(i, 0, DD_WindowNames(i), 1)
CompilerElse
R = OpenXMLDialog(i, 0, DD_WindowNames(i))
CompilerEndif
If R
HideWindow(DialogWindow(i), 0)
ok = #True
Else
Debug DialogError(i)
EndIf
Next i
CompilerIf Defined(PB_OS_Web, #PB_Constant) = 0 Or #PB_Compiler_OS <> #PB_OS_Web
If ok
While WaitWindowEvent() <> #PB_Event_CloseWindow : Wend
EndIf
CompilerEndIf
Else
Debug XMLStatus(0)
Debug XMLError(0)
EndIf
CompilerIf #DD_UseExtraStuff
DEX::DeInit()
CompilerEndif
CompilerEndif
;(c) HeX0R 2021
Code: Select all
<?xml version="1.0" encoding="UTF-8"?>
<dialogs><!--Created by Dialog Design0R V1.85 => get it from: https://hex0rs.coderbu.de/en/sdm_downloads/dialogdesign0r/-->
<window flags="#PB_Window_SystemMenu | #PB_Window_MinimizeGadget | #PB_Window_MaximizeGadget | #PB_Window_SizeGadget | #PB_Window_ScreenCentered" width="800" height="600" margin="vertical:0,horizontal:0" name="window" xpos="104" ypos="104" id="#window">
<vbox expand="item:2" spacing="0">
<hbox expand="item:2" height="10">
<singlebox>
<text text="Text" id="#text_1"/>
</singlebox>
<empty/>
<buttonimage width="9" height="9" id="#buttonimage_1"/>
</hbox>
<tree id="#tree_1"/>
</vbox>
</window>
</dialogs><!--DDesign0R Definition: PureBasic|1|1|1|_|-|1-->


