Vertically split a form [message #23238] |
Wed, 26 November 2008 17:57 |
Eclipse User |
|
|
|
Originally posted by: news.s237965939.online.de
Is it possible to vertically split a form? From all what I've found on
the internet it isn't. I'd like to display two Choicegroups in a form.
One to left (1/3) and one to te right (2/3). That would be a great
enhancement for my UI. The strings to choose are short so it would fit
into thes mallest display if possible.
TIA,
Hans
|
|
|
|
Re: Vertically split a form [message #24677 is a reply to message #23515] |
Thu, 01 January 2009 22:53 |
Eclipse User |
|
|
|
Originally posted by: news.s237965939.online.de
David Marques wrote:
> Hello Hans,
>
> The behavior of high level widgets of the LCDUI are nativelly defined.
> So I guess there is nothing you can do about it. A possible solution
> would be to implement the UI inside a canvas.
Hello David,
as I've found out it IS possible to vertically split two choiceboxes.
The keyword is "Spacer". Here comes the code:
static ChoiceGroup base = new ChoiceGroup("Base", Choice.EXCLUSIVE);
static ChoiceGroup type = new ChoiceGroup("Type", Choice.EXCLUSIVE);
Spacer spacer = new Spacer(10,0);
int layout = Item.LAYOUT_2|Item.LAYOUT_TOP|Item.LAYOUT_EXPAND;
public InputSelectedForm(String title) {
super(title);
// populate the choiceboxes here
base.setLayout(layout);
type.setLayout(layout);
base.setSelectedIndex(0, true);
type.setSelectedIndex(0, true);
append(base);
append(spacer);
append(type);
addCommand(new Command("Cancel", Command.CANCEL, 1));
addCommand(new Command("OK", Command.OK, 1));
}
|
|
|
|
Re: Vertically split a form [message #569571 is a reply to message #23515] |
Thu, 01 January 2009 22:53 |
Eclipse User |
|
|
|
Originally posted by: news.s237965939.online.de
David Marques wrote:
> Hello Hans,
>
> The behavior of high level widgets of the LCDUI are nativelly defined.
> So I guess there is nothing you can do about it. A possible solution
> would be to implement the UI inside a canvas.
Hello David,
as I've found out it IS possible to vertically split two choiceboxes.
The keyword is "Spacer". Here comes the code:
static ChoiceGroup base = new ChoiceGroup("Base", Choice.EXCLUSIVE);
static ChoiceGroup type = new ChoiceGroup("Type", Choice.EXCLUSIVE);
Spacer spacer = new Spacer(10,0);
int layout = Item.LAYOUT_2|Item.LAYOUT_TOP|Item.LAYOUT_EXPAND;
public InputSelectedForm(String title) {
super(title);
// populate the choiceboxes here
base.setLayout(layout);
type.setLayout(layout);
base.setSelectedIndex(0, true);
type.setSelectedIndex(0, true);
append(base);
append(spacer);
append(type);
addCommand(new Command("Cancel", Command.CANCEL, 1));
addCommand(new Command("OK", Command.OK, 1));
}
|
|
|
Powered by
FUDForum. Page generated in 0.04299 seconds