Dialog margins

Just starting out? Need help? Post your questions and find answers here.
Torp
Posts: 4
Joined: Wed Feb 26, 2014 9:27 am

Dialog margins

Post by Torp »

I don't know what I'm doing wrong, but I can't get 'margin' to work in the dialogs.
I've tried everything (singlebox/vbox/hbox/gridbox...) but nothing works.
If you set margin='20', you get the expected result all round.
However, all combinations of margin='top:xx, bottom:xx,...' don't work.
In this example I'd like to offset the tabs at the top of the screen but nothing works and I don't know why.
If you have any ideas, I'd love to hear from you.
Thanks

Code: Select all

#Xml = 0 : #Dialog = 0

XML$ = "<window id='#PB_Any' name='dialog1' text='test' flags='#PB_Window_Background'>" +
       "      <singlebox margin='top:100, bottom:20, horizontal:10'>" +
       "        <panel name='Tab'>" +
       "          <tab text='Tab1'/>" +
       "          <tab text='Tab2'/>" +
       "        </panel>" +
       "      </singlebox>" +
       "  </window>"

If ParseXML(#Xml, XML$) And XMLStatus(#Xml) = #PB_XML_Success

  If CreateDialog(#Dialog) And OpenXMLDialog(#Dialog, #Xml, "dialog1")
    Debug "Dialog successfully created"
  Else
    Debug "Dialog error: " + DialogError(#Dialog)
  EndIf
Else
  Debug "XML error: " + XMLError(#Xml) + " (Line: " + XMLErrorLine(#Xml) + ")"
EndIf 
User avatar
Peter
Posts: 1197
Joined: Mon Feb 24, 2014 10:17 pm
Location: 127.0.0.1:9080
Contact:

Re: Dialog margins

Post by Peter »

Looks like this is a feature not yet implemented, because the same code (slightly adapted) works in PureBasic.
Torp
Posts: 4
Joined: Wed Feb 26, 2014 9:27 am

Re: Dialog margins

Post by Torp »

That's a shame.
It complicates display management on the phone.
Post Reply