strange behaviour of sizewindow
Posted: Thu Oct 22, 2020 12:19 pm
changing the size window the display on it does not change the width consequently, while the height does.
Help please
Help please
Code: Select all
ttt$=[[
<?xml version="1.0" encoding="iso-8859-1"?>
<application id="EasyRapa">
<window id="win" title="EasyRapa" width="300" height="300">
<hgroup ID="tab_l_o" title="Lay-Out">
<rectangle id="ret_lo"/>
<hollywood display="1" fixwidth="false" fixheight="false"/>
<rectangle/>
</hgroup>
</window>
</application>
]]
@REQUIRE "RapaGUI", {Version = 1, Revision = 2}
Function p_EventFunc(msg)
; DebugPrint(msg.action)
Switch msg.action
Case "RapaGUI":
Case "SizeWindow"
h,w=msg.height,msg.width
DebugPrint("zzz",w,h)
SelectDisplay(1)
ChangeDisplaySize(w,h,{X = 0, Y = 0})
moai.DoMethod("ret_lo", "Redraw")
EndSwitch
EndFunction
moai.CreateApp(ttt$)
InstallEventHandler({RapaGUI = p_EventFunc, sizewindow= p_EventFunc})
Repeat
WaitEvent
Forever