ChangeDisplaySize() vs SetDisplayAttributes()
Posted: Sun Feb 06, 2022 2:10 pm
While RapaGUI in on and I want to change a separate -non embedded- display's size, only SetDisplayAttributes() makes visible effect.
Try this test case:
The OpenDisplay() is needed because RapaGUI keeps the display closed by default.
If you run the script, the text will be vanish and the display attributes are changes but the window will keeps the same size.
Then you should uncomment SetDisplayAttributes() and comment out ChangeDisplaySize() and voila, works as expected.
Now the question: bug or feature?
(OS4.1FEu2, Peg2, HW9, RapaGUI 2.1)
Try this test case:
Code: Select all
@REQUIRE "rapagui"
@DISPLAY 1,{hidden=False, title="World", mode="windowed", width=320, height=200}
Const #scrolldisplay = 1
OpenDisplay(#scrolldisplay)
SelectDisplay(#scrolldisplay)
TextOut(#CENTER,#CENTER, "Press LMB")
WaitLeftMouse
ChangeDisplaySize(640,480,{x=#KEEPPOSITION,y=#KEEPPOSITION})
;SetDisplayAttributes({width=640, height=480})
TextOut(#CENTER,#CENTER, "Display changed!")
WaitLeftMouse
If you run the script, the text will be vanish and the display attributes are changes but the window will keeps the same size.
Then you should uncomment SetDisplayAttributes() and comment out ChangeDisplaySize() and voila, works as expected.
Now the question: bug or feature?
(OS4.1FEu2, Peg2, HW9, RapaGUI 2.1)