SB 3.10 - Error in the dialog library (gridbox, singlebox)?
Posted: Sat Aug 23, 2025 8:22 am
Regarding the gridbox: As an example, I have two buttons that should be the same size (colexpand=‘equal’). They are, but the text does not fit completely into the button. How much text is cut off depends on the font size. The larger the font, the less fits into the button.
Regarding the singlebox: If I specify a value for the entire margin, it works. However, if I specify a different value for each side, it no longer works and the default value seems to be used.
Under PureBasic, it works as expected.
Have I done something wrong, or is this really an error in the library?
Regarding the singlebox: If I specify a value for the entire margin, it works. However, if I specify a different value for each side, it no longer works and the default value seems to be used.
Under PureBasic, it works as expected.
Have I done something wrong, or is this really an error in the library?
Code: Select all
#Xml=0
#Dlg=0
Xml$="<window id='0' name='test' text='That is a window' margin='5' minwidth='300' minheight='auto' flags='#PB_Window_ScreenCentered'>"+
Xml$+" <vbox>"+
Xml$+" <string id='2' text='User' flags='#PB_String_PlaceHolder'/>"+
Xml$+" <string id='3' text='Password' flags='#PB_String_PlaceHolder|#PB_String_Password'/>"+
Xml$+" <singlebox expand='no' margin='vertical:5,left:10,right:0' align='center'>"+
Xml$+" <gridbox columns='2' colexpand='equal' colspacing='15'>"+
Xml$+" <button id='4' text='OK'/>"+
Xml$+" <button id='5' text='SOMETHING'/>"+
Xml$+" </gridbox>"+
Xml$+" </singlebox>"+
Xml$+" </vbox>"+
Xml$+"</window>"
If ParseXML(#Xml, Xml$) And XMLStatus(#Xml) = #PB_XML_Success
If CreateDialog(#Dlg) And OpenXMLDialog(#Dlg, #Xml, "test")
Debug "Dialog created"
Else
Debug "Dialog error: " + DialogError(#Dlg)
End
EndIf
Else
Debug "XML error: " + XMLError(#Xml) + #LFCR$ + " (Line: " + XMLErrorLine(#Xml) + ")"
End
EndIf
FreeXML(#Xml)