Kukulkan hat geschrieben:So, Fakt ist also dass PB nicht mal einfachste GUI mit Option-Gadgets schafft. Ich musste das dann mit einer menge Code umschiffen (übrigens für alle drei Plattformen anders).
Ich verstehe ehrlich gesagt nicht, was an dem Problem so schwierig sein soll und warum man dafür eine Menge Code benötigt, der zudem auf allen drei Plattformen unterschiedlich sein soll. Warum beherzigst Du nicht Freds Vorschlag, dieses Problem mit Code etwa in der folgenden Form zu lösen, die gerade einmal 11 zusätzliche Code-Zeilen benötigt und die zudem in keiner Weise plattformspezifisch ist:
Code: Alles auswählen
CompilerIf #PB_Compiler_Unicode
#XmlEncoding = #PB_UTF8
CompilerElse
#XmlEncoding = #PB_Ascii
CompilerEndIf
#Dialog = 0
#Xml = 0
XML$ = "<?xml version='1.0' ?>"+
" <window id='#PB_Any' name='test' text='Gridbox' minwidth='auto' minheight='auto' flags='#PB_Window_ScreenCentered | #PB_Window_SystemMenu | #PB_Window_SizeGadget'>"+
" <gridbox columns='2' colexpand='item:2'>"+
" <option name='cboProxy1' colspan='2' text='Keinen Proxy verwenden'/>"+
" <option name='cboProxy2' colspan='2' text='Proxy Server verwenden (server:port):'/>"+
" <empty width='10'/><string name='strProxyURL' minwidth='250' />"+
" <option name='cboProxy3' colspan='2' text='Proxy Autoconfiguration File (PAC) verwenden:'/>"+
" <empty/><string name='strProxyPACURL' width='250' />"+
" <hbox colspan='2'>"+
" <button name='btnOK' text='OK' />"+
" <button name='btnCancel' text='Abbruch'/>"+
" </hbox>"+
" </gridbox>"+
" </window>"
If CatchXML(#Xml, @XML$, StringByteLength(XML$), 0, #XmlEncoding) And XMLStatus(#Xml) = #PB_XML_Success
If CreateDialog(#Dialog) And OpenXMLDialog(#Dialog, #Xml, "test")
Repeat
Select WaitWindowEvent()
Case #PB_Event_CloseWindow
Break
Case #PB_Event_Gadget
Select EventGadget()
Case DialogGadget(#Dialog, "cboProxy1")
SetGadgetState(DialogGadget(#Dialog, "cboProxy3"), #False)
Case DialogGadget(#Dialog, "cboProxy2")
SetGadgetState(DialogGadget(#Dialog, "cboProxy3"), #False)
Case DialogGadget(#Dialog, "cboProxy3")
SetGadgetState(DialogGadget(#Dialog, "cboProxy1"), #False)
SetGadgetState(DialogGadget(#Dialog, "cboProxy2"), #False)
EndSelect
EndSelect
ForEver
Else
Debug "Dialog error: " + DialogError(#Dialog)
EndIf
Else
Debug "XML error: " + XMLError(#Xml) + " (Line: " + XMLErrorLine(#Xml) + ")"
EndIf
Ich vermute einmal, dass Fred eine native Lösung in PureBasic für relativ aufwendig hält und es in seinen Augen wahrscheinlich Probleme in PureBasic gibt, denen er eine größere Priorität einräumt, zumal Dein Problem sich ja anscheinend relativ einfach per Code lösen läßt.