Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » DSDP - Mobile Tools for Java (MTJ) » Vertically split a form
Vertically split a form [message #23238] Wed, 26 November 2008 17:57 Go to next message
Eclipse UserFriend
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 #23515 is a reply to message #23238] Thu, 27 November 2008 13:22 Go to previous messageGo to next message
David Marques is currently offline David MarquesFriend
Messages: 80
Registered: July 2009
Member
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.

[],

David Marques
Re: Vertically split a form [message #24677 is a reply to message #23515] Thu, 01 January 2009 22:53 Go to previous message
Eclipse UserFriend
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 #568787 is a reply to message #23238] Thu, 27 November 2008 13:22 Go to previous message
David Marques is currently offline David MarquesFriend
Messages: 80
Registered: July 2009
Member
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.

[],

David Marques
Re: Vertically split a form [message #569571 is a reply to message #23515] Thu, 01 January 2009 22:53 Go to previous message
Eclipse UserFriend
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));
}
Previous Topic:Obfuscated version doesn't run
Next Topic:OTA server question
Goto Forum:
  


Current Time: Thu Mar 28 22:12:06 GMT 2024

Powered by FUDForum. Page generated in 0.02968 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top