Alignment of an image

Discuss GUI programming with the RapaGUI plugin here
Post Reply
User avatar
root
Posts: 23
Joined: Sun Feb 14, 2010 12:24 pm

Alignment of an image

Post by root »

Is there a possibility to align a picture on the window?
plouf
Posts: 472
Joined: Sun Feb 04, 2018 11:51 pm
Location: Athens,Greece

Re: Alignment of an image

Post by plouf »

Isnt the normal way or rapagui with vgroup hgroup etc
Working for you?
Christos
User avatar
root
Posts: 23
Joined: Sun Feb 14, 2010 12:24 pm

Re: Alignment of an image

Post 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
plouf
Posts: 472
Joined: Sun Feb 04, 2018 11:51 pm
Location: Athens,Greece

Re: Alignment of an image

Post 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>
Christos
User avatar
root
Posts: 23
Joined: Sun Feb 14, 2010 12:24 pm

Re: Alignment of an image

Post by root »

Ahhh!
Thank you very much!
Post Reply