Hi, The code below is part of the task, but it center the main chess table in the dock center panel. Does this work for you or at least give some help?
http://www.puntosoft.com.ar/gwt/layoutChess/LayoutChess.html http://www.puntosoft.com.ar/gwt/layoutChess/LayoutChess.java http://www.puntosoft.com.ar/gwt/layoutChess/ChessTable.java On Wed, Jun 9, 2010 at 12:50 PM, Magnus <[email protected]>wrote: > Hi, > > everything you said is correct. > > Magnus > > On Jun 9, 5:09 pm, "Alejandro D. Garin" <[email protected]> wrote: > > Hi, > > > > To be clear: What are you expecting to have in your layout scenario? i.e. > A > > menu on top, a Chess Widget centered in the browser with same margins > from > > top/left/right/bottoms? Also, the chess Widget should have 64 cells of > the > > same height/width.? i.e. the cell doesn't change if the browser resize? > > > > On Wed, Jun 9, 2010 at 11:20 AM, Magnus <[email protected] > >wrote: > > > > > Hi group, > > > > > I have started writing the layout code using the onresize event, and I > > > think this will be the solution I wanted. I created a class "Display", > > > derived from LayoutPanel,. > > > > > But I am still missing information to layout my widgets. It is not > > > that easy to geht width and height, als mentioned above. > > > > > For example,. to resize my MenuBar, I need its natural height, i. e. > > > the height it needs to show its content. > > > Then I would resize it to (<window width>,<natural height>). > > > > > When I create it and add it to my LayourtPanel, it's immediately > > > resized to fill the whole window. > > > After that, getOffsetHeight returns not the desired result. > > > > > I also tried to save the height immediately after creation and before > > > adding it to the panel: > > > > > MenuBar menubar = new MenuBar (); > > > ... > > > int menuHeight = menubar.getOffsetHeight (); // will be 0 > > > add (menubar); > > > But it returns 0. > > > > > So I need a method to get the size a widget needs *independently* of > > > its current size. > > > > > Or how would you resize the menubar? > > > > > Thanks > > > Magnus > > > > > On 9 Jun., 15:35, Ian Bambury <[email protected]> wrote: > > > > > But how do I get the Resize-Event if I don't subclass an existing > > > > > layout panel? > > > > > > Window.addResizeHandler(handler); > > > > > -- > > > You received this message because you are subscribed to the Google > Groups > > > "Google Web Toolkit" group. > > > To post to this group, send email to > [email protected]. > > > To unsubscribe from this group, send email to > > > [email protected]<google-web-toolkit%[email protected]> > <google-web-toolkit%[email protected]<google-web-toolkit%[email protected]> > > > > > . > > > For more options, visit this group at > > >http://groups.google.com/group/google-web-toolkit?hl=en. > > -- > You received this message because you are subscribed to the Google Groups > "Google Web Toolkit" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]<google-web-toolkit%[email protected]> > . > For more options, visit this group at > http://groups.google.com/group/google-web-toolkit?hl=en. > > -- You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
