OK, i tried another layout form setup that looks strange to me.
See this screenshot of a form with some items with various col/rowspans:
It's pretty straightforward i suppose? All items are aligned fine, but as you can see, the textareas do not expand. We discussed this in another thread, so i tried to do as was suggested - i called setWidth("*") on both the textareas. I did not get the desired result as you can see in image #2 below:
The first textarea expands all the way, but the textitems below are strangely aligned and do not take up their entire cells. Also, the last textarea does not at all take up its cell.
What am i missing here? I would have expected this to look as the first image, but with textareas going all the way. Code below, pointers as always appreciated.
See this screenshot of a form with some items with various col/rowspans:
It's pretty straightforward i suppose? All items are aligned fine, but as you can see, the textareas do not expand. We discussed this in another thread, so i tried to do as was suggested - i called setWidth("*") on both the textareas. I did not get the desired result as you can see in image #2 below:
The first textarea expands all the way, but the textitems below are strangely aligned and do not take up their entire cells. Also, the last textarea does not at all take up its cell.
What am i missing here? I would have expected this to look as the first image, but with textareas going all the way. Code below, pointers as always appreciated.
Code:
@Override public void onModuleLoad() { HLayout hLayout = new HLayout(); hLayout.setWidth(600); hLayout.setHeight100(); hLayout.setBorder("1px solid red"); DynamicForm form = new DynamicForm(); form.setTitleOrientation(TitleOrientation.TOP); form.setWidth("100%"); form.setCellBorder(1); form.setTitleSuffix(null); form.setBorder("1px solid green"); form.setCanEdit(false); form.setCellPadding(10); form.setNumCols(3); TextItem royBatty = new TextItem(); TextItem deckard = new TextItem(); TextItem pris = new TextItem(); TextItem sebastian = new TextItem(); TextItem tyrell = new TextItem(); TextAreaItem dude = new TextAreaItem(); dude.setColSpan(2); dude.setRowSpan(2); TextAreaItem dude2 = new TextAreaItem(); dude2.setColSpan(3); //dude.setWidth("*");//UNCOMMENTING THESE causes image 2 rather than image 1 above //dude2.setWidth("*"); form.setItems(royBatty, dude, deckard, pris, sebastian, tyrell, dude2); hLayout.addMember(form); hLayout.draw(); }
Comment