Getting CellBrowser width, (re)position and re-size panel

64 views
Skip to first unread message

Tibo

unread,
Jan 13, 2012, 7:03:47 AM1/13/12
to Google Web Toolkit
Hello,

I am new to gwt, and I'm having trouble building the user interface
for my application.

First, I would like my application to have a CellBrowser widget on the
left side, and a panel on the right size that fill the remaining space
left by the CellBrowser, in order to display some information,
depending on the cell that the user selects. The problem is that I
don't know how to set the panel width to fill the remaining space,
because I don't know how to retrieve the width of the CellBrowser. I
tried several solutions, wrapping the CellBrowser into different panel
types, but none of them gave me the expected result.

Also, I would like that when the CellBrowser expands to the right, the
panel re-sizes to fill again the remaining width space (and the same
for when it contracts).

Would it be possible to implement such an interface? Which kind of
panel would be the most suitable to do it? And how can I (re)position
the panel to the right end of the CellBrowser?

Thanks in advance for any help.

Regards,

Thibaut Le Guilly

Thomas Broyer

unread,
Jan 14, 2012, 6:38:07 AM1/14/12
to google-we...@googlegroups.com
CellBrowser is a RequiresResize panel (see http://code.google.com/webtoolkit/doc/latest/DevGuideUiPanels.html ), it doesn't have an "intrinsic" size and grow with its content; instead it should be given explicit dimensions (possibly automatically by a ProvidesResize parent widget) and it fits its content inside the given area.

In your case, it means either not using CellBrowser, or accepting that it has a fixed size.

Tibo

unread,
Jan 15, 2012, 11:35:19 AM1/15/12
to Google Web Toolkit
Thank you for your answer. That is actually what I was thinking, but I
hoped that it might be a workaround.

I will take some time to re-think my interface then!



On Jan 14, 12:38 pm, Thomas Broyer <t.bro...@gmail.com> wrote:
> CellBrowser is a RequiresResize panel (seehttp://code.google.com/webtoolkit/doc/latest/DevGuideUiPanels.html), it
Reply all
Reply to author
Forward
0 new messages