Layout question with BlackBerry IDE FieldManagers; how to emulate HTML's rowspan

Posted by canadiancreed on Stack Overflow See other posts from Stack Overflow or by canadiancreed
Published on 2010-04-02T21:48:52Z Indexed on 2010/04/02 21:53 UTC
Read the original article Hit count: 166

Filed under:

Hello all

I'm trying to create a page where a list of items are displayed in a row where there are multiple columns on the left, but only one on the right, encased within a horizontialFieldManager. Currently I have the following code to attempt to do the following:

VerticalFieldManager mainScreenManager = new VerticalFieldManager();

mainScreenManager.add(titleField);

for (int i = 0; i < 10; i++) {

HorizontalFieldManager itemAreaManager = new HorizontalFieldManager(); VerticalFieldManager itemTextFieldsAreaManager = new VerticalFieldManager();

itemTextFieldsAreaManager.add(new RichTextField(contentArticleTitle[i]));
itemTextFieldsAreaManager.add(new RichTextField(contentArticleDate[i]));
itemTextFieldsAreaManager.add(new SeparatorField());
itemAreaManager.add(itemTextFieldsAreaManager);

itemAreaManager.add(new ButtonField(">>", 0));

mainScreenManager.add(itemAreaManager); };

add(mainScreenManager);

Now the issue I'm experiencing is probably obvious to those familiar with managers; the horizontialFieldManager has the first item added to it consuming the entire width available, thereby never showing the button. What I'm wondering is how can I tell this in an extended class to only take up a certain percentage of the available width? I've tried subLayout and setting the width to be a certain amount, but it will just show the button instead of the text (pretty much same problem, just reversed)

© Stack Overflow or respective owner

Related posts about blackberry