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

PB_Window_Background has no effect when used with Dialog

by Torp Fri Feb 01, 2019 10:49 am

Hello,

I'm having a little problem. The #PB_Window_Background parameter, seems to have no effect when the window is created with OpenXMLDialog. Is there a way to get around the problem to full screen using OpenXMLDialog?

Code: Select all
#Xml = 0
#Dialog = 0

; Define our dialog window here, using regular XML
;
XML$ = "<window id='#PB_Any' name='dialog1' text='Dialog example' flags='#PB_Window_Background'>" +
       "    <vbox>" +
       "      <option name='option1' text='Enter your credit card:' group='1'/>" +
       "      <string name='string' width='50' height='30'/>" +
       "      <option name='option2' text='Use paypal account' group='1'/>" +
       "      <option name='option3' text='Use wiretransfert' group='1'/>" +
       "      <hbox>" +
       "        <button name='ok' text='Continue' height='35'/>" +
       "        <button name='cancel' text='Cancel'/>" +
       "      </hbox>" +
       "    </vbox>" +
       "  </window>"

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

  If CreateDialog(#Dialog) And OpenXMLDialog(#Dialog, #Xml, "dialog1")
    Debug "Dialog successfully created"
   
    ; Use DialogGadget() to retrieve a gadget and use standard commands on it:
    Option3 = DialogGadget(#Dialog, "option3")
    SetGadgetState(Option3, #True) ; Set the 3rd option gadget as selected
  Else
    Debug "Dialog error: " + DialogError(#Dialog)
  EndIf
Else
  Debug "XML error: " + XMLError(#Xml) + " (Line: " + XMLErrorLine(#Xml) + ")"
EndIf 
User avatar
Peter
 
Posts: 577
Joined: Mon Feb 24, 2014 10:17 pm
Location: 127.0.0.1

Re: PB_Window_Background has no effect when used with Dialog

by Peter Mon Feb 04, 2019 2:38 pm

Torp wrote:The #PB_Window_Background parameter, seems to have no effect when the window is created with OpenXMLDialog.

yes, that's correct. See: https://forums.spiderbasic.com/viewtopic.php?p=4801#p4801

Greetings ... Peter
Fred
Site Admin
 
Posts: 1130
Joined: Mon Feb 24, 2014 10:51 am

Re: PB_Window_Background has no effect when used with Dialog

by Fred Mon Feb 04, 2019 7:06 pm

Added it to the dialog lib.
User avatar
Peter
 
Posts: 577
Joined: Mon Feb 24, 2014 10:17 pm
Location: 127.0.0.1

Re: PB_Window_Background has no effect when used with Dialog

by Peter Mon Feb 04, 2019 10:44 pm

Fred wrote:Added it to the dialog lib.

cool! Thank you! :)

Greetings ... Peter
Torp
 
Posts: 2
Joined: Wed Feb 26, 2014 9:27 am

Re: PB_Window_Background has no effect when used with Dialog

by Torp Tue Feb 05, 2019 10:00 pm

Thank you Sir ! :)
Return to Coding Questions

Who is online

Users browsing this forum: No registered users and 3 guests