Just starting out? Need help? Post your questions and find answers here.
-
Piero
- Addict

- Posts: 1040
- Joined: Sat Apr 29, 2023 6:04 pm
- Location: Italy
Post
by Piero »
Is this a bug? Try change OpenXMLDialog y below… on y zero it is circa at half screen here (Mac)
Code: Select all
#Dialog = 0
#Xml = 0
XML$ = "<window id='#PB_Any' name='test' text='test' minwidth='auto' minheight='auto' flags='#PB_Window_SystemMenu | #PB_Window_SizeGadget'>" +
" <panel>" +
" <tab text='First tab'>" +
" <vbox expand='item:2'>" +
" <hbox>" +
" <button text='button 1'/>" +
" <checkbox text='checkbox 1'/>" +
" <button text='button 2'/>" +
" </hbox>" +
" <editor text='content' height='150'/>" +
" </vbox>" +
" </tab>" +
" <tab text='Second tab'>" +
" </tab>" +
" </panel>" +
"</window>"
If ParseXML(#Xml, XML$) And XMLStatus(#Xml) = #PB_XML_Success
If CreateDialog(#Dialog) And OpenXMLDialog(#Dialog, #Xml, "test",0,10) ; <--- y 10 here
Repeat
Event = WaitWindowEvent()
Until Event = #PB_Event_CloseWindow
Else
Debug "Dialog error: " + DialogError(#Dialog)
EndIf
Else
Debug "XML error: " + XMLError(#Xml) + " (Line: " + XMLErrorLine(#Xml) + ")"
EndIf
-
Piero
- Addict

- Posts: 1040
- Joined: Sat Apr 29, 2023 6:04 pm
- Location: Italy
Post
by Piero »
Update:
on windows 10 no problem
on monterey m1 it doesn't work well even at low screen resolutions without retina…
-
Piero
- Addict

- Posts: 1040
- Joined: Sat Apr 29, 2023 6:04 pm
- Location: Italy
Post
by Piero »
Code: Select all
#Dialog = 0
#Xml = 0
XML$ = "<window id='#PB_Any' name='test' text='test' minwidth='auto' minheight='auto' flags='#PB_Window_SystemMenu | #PB_Window_SizeGadget'>" +
" <panel>" +
" <tab text='First tab'>" +
" <vbox expand='item:2'>" +
" <hbox>" +
" <button text='button 1'/>" +
" <checkbox text='checkbox 1'/>" +
" <button text='button 2'/>" +
" </hbox>" +
" <editor text='content' height='150'/>" +
" </vbox>" +
" </tab>" +
" <tab text='Second tab'>" +
" </tab>" +
" </panel>" +
"</window>"
If ParseXML(#Xml, XML$) And XMLStatus(#Xml) = #PB_XML_Success
If CreateDialog(#Dialog) And OpenXMLDialog(#Dialog, #Xml, "test",0,0) ; <--- buggy y
ResizeWindow(DialogWindow(#Dialog),0,0,#PB_Ignore,#PB_Ignore) ; fix y
Repeat
Event = WaitWindowEvent()
Until Event = #PB_Event_CloseWindow
Else
Debug "Dialog error: " + DialogError(#Dialog)
EndIf
Else
Debug "XML error: " + XMLError(#Xml) + " (Line: " + XMLErrorLine(#Xml) + ")"
EndIf