Page 1 of 1

Alignment of an image

Posted: Mon Oct 10, 2022 7:44 pm
by root
Is there a possibility to align a picture on the window?

Re: Alignment of an image

Posted: Mon Oct 10, 2022 8:35 pm
by plouf
Isnt the normal way or rapagui with vgroup hgroup etc
Working for you?

Re: Alignment of an image

Posted: Tue Oct 11, 2022 4:04 pm
by root
Ok, for an exampel i want to force the image in the rapagui Demo Image.hws to the left site.

Code: Select all

<?xml version="1.0" encoding="iso-8859-1"?>
<application id="app">
	<window title="Image">
		<hgroup>
			<vgroup>
				<rectangle/>
				<hgroup frame="true" halign="left">
					<rectangle/>
					<image id="image" brush="1"/>
					<rectangle/>
				</hgroup>
				<button id="flip">Flip</button>
				<rectangle/>
			</vgroup>
		</hgroup>
	</window>
</application>
But the image is always centred

Re: Alignment of an image

Posted: Tue Oct 11, 2022 4:13 pm
by plouf
remove the rectangle from the side you want to align
rectangle auto resizes

Code: Select all

<?xml version="1.0" encoding="iso-8859-1"?>
<application id="app">
	<window title="Image">
		<hgroup>
			<vgroup>
				<rectangle/>
				<hgroup frame="true" halign="right">
					<rectangle/>  
					<image id="image" brush="1"/>
					;<rectangle/>; THIS 
				</hgroup>
				<button id="flip">Flip</button>
				<rectangle/>
			</vgroup>
		</hgroup>
	</window>
</application>

Re: Alignment of an image

Posted: Tue Oct 11, 2022 5:26 pm
by root
Ahhh!
Thank you very much!