if i create a dialog and add a menu or toolbar afterwards, the layout engine does not take menu height and toolbar height into account.
Here is an example:
Code: Select all
#Dialog = 0
#Xml = 0
XML$ +
"<window id='0' width='200' height='200' name='test' text='Test' flags='#PB_Window_ScreenCentered | #PB_Window_SystemMenu'>" +
"  <button text='Click'/>" +
"</window>"
If CatchXML(#Xml, @XML$, StringByteLength(XML$)) And XMLStatus(#Xml) = #PB_XML_Success
  If CreateDialog(#Dialog) And OpenXMLDialog(#Dialog, #Xml, "test")
    
    CreateMenu(0, WindowID(0))
    MenuTitle("File")
    
    CreateToolBar(0, WindowID(0))
    ToolBarStandardButton(0, #PB_ToolBarIcon_New)
    
    Repeat
      Event = WaitWindowEvent()
    Until Event = #PB_Event_CloseWindow
  Else
    Debug "Dialog error: " + DialogError(#Dialog)
  EndIf
Else
  Debug "XML error: " + XMLError(#Xml) + " (Line: " + XMLErrorLine(#Xml) + ")"
EndIfBest regards
Uwe


