Setting align in xml script

Discuss GUI programming with the RapaGUI plugin here
Post Reply
LarsB
Posts: 72
Joined: Sat May 06, 2017 4:37 pm

Setting align in xml script

Post by LarsB »

Hi there,

I am just trying simple GUI features to see what can be done and whats not.

I have a image and a radio button field. The radio button field is left and the image right.
Now I wonder if it is possible to apply a tag that would display the radio buttons not in the center but at the top or bottom of its
horizontal position. Using vspace = 480 yielded at leat to display it at the bottom.
But I cannot display the radio field over the center-position. So I am curious if there is align tag which could help me there.

Here is the xml code

Code: Select all

<?xml version="1.0" encoding="iso-8859-1"?>
<application id="app">

 <window title="Beispiel UI" >
<hgroup>      
<vgroup>
<vspace height="480"/>  
<radio id="Radio-Sender">
<item>NDR</item>
<item>Njoy</item>
<item>Radio Stuttgart</item>
</radio>
</vgroup>
<vgroup title="Image"><image brush="1"/><vspace height="20"/>  
</vgroup> 

</hgroup>
</window>

</application>
Here is the minimal hollywoodcode.

Code: Select all

@DISPLAY {Width = 480, Height = 220}
@REQUIRE "RapaGUI"
@BRUSH 1, "back2.png" /*size 480*400*/

moai.CreateApp(FileToString("GUI16.xml"))
EscapeQuit(True)

i= 0
Repeat
i = i + 1	
Until i = 300000
{/code]
User avatar
airsoftsoftwair
Posts: 5446
Joined: Fri Feb 12, 2010 2:33 pm
Location: Germany
Contact:

Re: Setting align in xml script

Post by airsoftsoftwair »

I don't understand. Where do you want to display the radio buttons? At the top, at the bottom, or in the center?
LarsB
Posts: 72
Joined: Sat May 06, 2017 4:37 pm

Re: Setting align in xml script

Post by LarsB »

At the top.

But I guess I found a workaround. Anyway it would be cool, if I could solve it with aligments.
User avatar
airsoftsoftwair
Posts: 5446
Joined: Fri Feb 12, 2010 2:33 pm
Location: Germany
Contact:

Re: Setting align in xml script

Post by airsoftsoftwair »

To have it at the top, just insert a sizeable padding rectangle into the vgroup, like so:

Code: Select all

<?xml version="1.0" encoding="iso-8859-1"?>
<application id="app">

 <window title="Beispiel UI" >
<hgroup>      
<vgroup>
<radio id="Radio-Sender">
<item>NDR</item>
<item>Njoy</item>
<item>Radio Stuttgart</item>
</radio>
<rectangle/>	
</vgroup>
<vgroup title="Image"><image brush="1"/><vspace height="20"/>  
</vgroup> 

</hgroup>
</window>

</application>
LarsB
Posts: 72
Joined: Sat May 06, 2017 4:37 pm

Re: Setting align in xml script

Post by LarsB »

Hey,

thank you very much. Its more elegant then my approach. It was just to create a vgroup with a gray image. So I could adjust
the high of the radio buttons quite exactly. But its more rude in its way.

BTW I am just having much fun with Hollywood and playing/learning its possibilities. In the programm I exchanged the listview
with a display. So I could use greater fonts And a textscroller with layers which works good..

So all in all thank you for the great work :)
Post Reply