PDA

View Full Version : Multiple icons within one cell in a TreeGrid?



NotChris
26 Sep 2011, 5:59 AM
I need to be able to place multiple icons within a cell in a treegrid. I have one being displayed correctly but was wondering if it is possible to place multiple icons within some type of a container within a treegrid cell?

Thank you.



List<ColumnConfig> configs = model.getColumns();
IconButton newBtn = new IconButton(style);
configs.add(1, newBtn);

NotChris
26 Sep 2011, 6:35 AM
I tried a ContentPanel in this case but it adds a header and footer which I do not want. Any suggestions on what container to use in this case?

NotChris
26 Sep 2011, 1:29 PM
OK, it appears that a HorizontalPanel works in this case. The icons appear next to each other horizontally in the treegrid cell. So this has been answered.

HorizontalPanel hp = new HorizontalPanel();
List<ColumnConfig> configs = model.getColumns();
IconButton newBtn = new IconButton(style1);
IconButton saveBtn = new IconButton(style2);
hp.add(newBtn);
hp.add(saveBtn);
configs.add(1, hp);

sven
26 Sep 2011, 9:35 PM
Is there any special reason why you want to use widgets at all? If you just want to display icons you can better simple put in the html markup as string