Page 1 of 1
windows sizable
Posted: Tue Oct 05, 2021 8:33 pm
by sashapont
I try add image to window
Code: Select all
moai.CreateObject("<image id=\"image1\" brush=\"1\"/>", "container")
moai.DoMethod("container", "initchange")
If count = 1 Then moai.DoMethod("container", "remove", "blankspace")
moai.DoMethod("container", "append", "image1")
moai.DoMethod("container", "exitchange", false)
After that my windows become horizontal fixed size& Are there any way to fix that?
Re: windows sizable
Posted: Wed Oct 06, 2021 11:07 am
by mrupp
Try adding a <rectangle /> after the <image>.
Re: windows sizable
Posted: Wed Oct 06, 2021 7:31 pm
by sashapont
Is not work^ or I am doing something wrong

Re: windows sizable
Posted: Sat Oct 09, 2021 7:27 pm
by plouf
Firstly i see that you create a object "image" in a window called "container"
and then you append it to a groujp called "container" again !
a working-(problematic) code sample would help
check out this one if helps you
Code: Select all
@REQUIRE "RapaGUI"
CreateBrush(1, 320, 256, #BLUE)
moai.CreateApp([[
<?xml version="1.0" encoding="iso-8859-1"?>
<application id="app">
<window id="mywindow" title="Test program">
<hgroup>
<vgroup id="container">
<button>Hello World!</button>
<rectangle />
</vgroup>
<rectangle />
</hgroup>
</window>
</application>
]])
moai.CreateObject("<image id=\"image1\" brush=\"1\" />", "mywindow")
moai.DoMethod("container", "initchange")
If count = 1 Then moai.DoMethod("container", "remove", "blankspace")
moai.DoMethod("container", "append", "image1")
moai.DoMethod("container", "exitchange", False)
Repeat
WaitEvent()
Forever