windows sizable

Discuss GUI programming with the RapaGUI plugin here
Post Reply
sashapont
Posts: 152
Joined: Thu Aug 03, 2017 2:49 pm

windows sizable

Post 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?
User avatar
mrupp
Posts: 147
Joined: Sun Jan 31, 2021 7:44 pm
Location: Switzerland
Contact:

Re: windows sizable

Post by mrupp »

Try adding a <rectangle /> after the <image>.
sashapont
Posts: 152
Joined: Thu Aug 03, 2017 2:49 pm

Re: windows sizable

Post by sashapont »

Is not work^ or I am doing something wrong :(
plouf
Posts: 462
Joined: Sun Feb 04, 2018 11:51 pm
Location: Athens,Greece

Re: windows sizable

Post 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
Christos
Post Reply