Radio horizontal lay-out

Discuss GUI programming with the RapaGUI plugin here
Post Reply
ilbarbax
Posts: 112
Joined: Thu Apr 01, 2010 6:41 pm

Radio horizontal lay-out

Post by ilbarbax »

Is the radio intended to have only vertical lay-out or there is some way to have it in horizontal?
SamuraiCrow
Posts: 475
Joined: Fri May 15, 2015 5:15 pm
Location: Waterville, Minnesota USA

Re: Radio horizontal lay-out

Post by SamuraiCrow »

Try using a colgroup or an hgroup. I'm sure i've done colgroups with multiple columns.
I'm on registered MorphOS using FlowStudio.
SamuraiCrow
Posts: 475
Joined: Fri May 15, 2015 5:15 pm
Location: Waterville, Minnesota USA

Re: Radio horizontal lay-out

Post by SamuraiCrow »

On second thought, that may have been while I was tinkering in C++ with wxWidgets years ago.
I'm on registered MorphOS using FlowStudio.
User avatar
airsoftsoftwair
Posts: 5425
Joined: Fri Feb 12, 2010 2:33 pm
Location: Germany
Contact:

Re: Radio horizontal lay-out

Post by airsoftsoftwair »

Currently, only vertical layouts are supported because AFAIR MUI only supports only vertical radio layouts...
User avatar
mrupp
Posts: 147
Joined: Sun Jan 31, 2021 7:44 pm
Location: Switzerland
Contact:

Re: Radio horizontal lay-out

Post by mrupp »

They now seem to support horizontal layouts as well:
Taken from https://github.com/amiga-mui/muidev/wiki/MUI_Radio:
By default, MUI will place the entries vertically below each other. But since Radio class is a subclass of Group class, you can use group layout attributes to adjust the layout to your needs, e.g. MUIA_Group_Horiz, TRUE for a horizontal radio button row or even MUIA_Group_Rows/Columns for a more fancy layout.
User avatar
airsoftsoftwair
Posts: 5425
Joined: Fri Feb 12, 2010 2:33 pm
Location: Germany
Contact:

Re: Radio horizontal lay-out

Post by airsoftsoftwair »

Thanks for the pointer! I'll definitely implement this because it's really useful and I didn't know that MUI supports it now.
User avatar
airsoftsoftwair
Posts: 5425
Joined: Fri Feb 12, 2010 2:33 pm
Location: Germany
Contact:

Re: Radio horizontal lay-out

Post by airsoftsoftwair »

Code: Select all

- New: Added Radio.Columns [I] attribute; this allows you to set the number of columns to use when laying
  out the radio buttons (defaults to 1); note that on Android, you cannot have complex radio layouts that
  use columns and rows; you can either have all radio buttons appear in one row (horizontal layout) or in
  one column (vertical layout)
Post Reply