Re: fundamental problems with predictive layout

2012-09-07 Thread Jens
For example, the solution posted by Jens works perfectly in isolation, but when I put it into a LayoutPanel it didn't work at all. Really? For me it works. Copy the example UiBinder xml and put it into a RootLayoutPanel: !DOCTYPE ui:UiBinder SYSTEM http://dl.google.com/gwt/DTD/xhtml.ent;

Re: fundamental problems with predictive layout

2012-09-07 Thread Abraham Lin
the only empty DIV I see is the label, and it's empty because the label does not contain text. Right, and that's why it has zero height as you observed. Do you agree to the statement posted in this thread that the GWT's layout panels should be used for the overall page layout

Re: fundamental problems with predictive layout

2012-09-06 Thread Andrei
Most modern browsers are pretty consistent with CSS2 and even CSS3. There are still some differences, but in a few instances where I ran into them, GWT could not help me. Sometimes you have to specify -moz or -webkit specific rules in your CSS file. In some situations (e.g. vertical-align in

Re: fundamental problems with predictive layout

2012-09-06 Thread Andrei
Sorry, I meant to say that I would love GWT to drop support for IE 7, an maybe even IE 8, if it allows to greatly simplify the library, reduce the generated code size, significantly reduce compilation time, and speed up development of new features. -- You received this message because you are

Re: fundamental problems with predictive layout

2012-09-06 Thread Abraham Lin
I think you're misunderstanding how GWT works. Everything written using GWT compiles down to HTML, CSS, and other native web technologies - there is no difference between panels (LayoutPanels or otherwise) and widgets as far as mapping goes. What seems to be the issue here is that the

Re: fundamental problems with predictive layout

2012-09-06 Thread Magnus
Hi Abraham, the only empty DIV I see is the label, and it's empty because the label does not contain text. Do you agree to the statement posted in this thread that the GWT's layout panels should be used for the overall page layout (defining the main areas of a page) and that the small layouts

Re: fundamental problems with predictive layout

2012-09-06 Thread Magnus
Hi Andrei! There are many great GWT widgets that insulate you from major browser issues, especially LayoutPanel, PopupPanel, DialogBox, DataGrid. But it's too expensive to try and figure out solutions for minor issues, so they still remain. Yes, they do. I built my app with these panels

Re: fundamental problems with predictive layout

2012-09-05 Thread Magnus
Hello, thank you for your help! I have got it running now, but I am not happy with it. After trying around with integrating the CSS code provided here into the outer LayoutPanel, I soon found myself traversing discussion groups about HTML/CSS. In these groups, people are also talking about

Re: fundamental problems with predictive layout

2012-09-04 Thread Magnus
Hello, I have changed the composite widget to use just HTML/CSS, but the label is not visible (size 0) after adding the composite widgetto a LayoutPanel. In addition I have to hard code the height of the widget, without knowing how much height a button and a lable need in the different

Re: fundamental problems with predictive layout

2012-09-04 Thread Magnus
Am Montag, 3. September 2012 10:09:45 UTC+2 schrieb Ümit Seren: How about using nested LayoutPanels? Or if you don't want to use LayoutPanels all the way but need resizing in one of the inner widget you could wrap it in a

Re: fundamental problems with predictive layout

2012-09-04 Thread Magnus
Hello, I have changed the composite widget to use just HTML/CSS, but the label is not visible (size 0) after adding the composite widgetto a LayoutPanel. In addition I have to hard code the height of the widget, without knowing how much height a button and a lable need in the different

Re: fundamental problems with predictive layout

2012-09-04 Thread Andrei
When you add a widget to a LayoutPanel, it automatically takes the entire space within that LayoutPanel, unless you use .setWidgetTopHeight or similar methods to specify which part of the LayoutPanel this widget should occupy. If your FlowPanel has size 0, this means that your LayoutPanel has

Re: fundamental problems with predictive layout

2012-09-04 Thread Magnus
Hi Andrei, I can verify that the LayoutPanel is not zero sized! It's about 400px x 60px. It's only the label that gets height 0, not the button. I would be glad I could copy the generated HTML from the Firefox inspection panel, but this is not possible. However, I tried the following: I

Re: fundamental problems with predictive layout

2012-09-04 Thread Magnus
Hi, I managed to copy the generated HTML code with chrome. The outer div is the AbsolutePanel that acts as the intermediate panel between the LayoutPanel and the widget: div style=position: relative; overflow: hidden; border: 1px solid rgb(0, 255, 0); cls=AbsoluteInCell div style=border:

Re: fundamental problems with predictive layout

2012-09-03 Thread Ümit Seren
How about using nested LayoutPanels? Or if you don't want to use LayoutPanels all the way but need resizing in one of the inner widget you could wrap it in a http://google-web-toolkit.googlecode.com/svn/javadoc/latest/com/google/gwt/user/client/ui/ResizeLayoutPanel.html . On Sunday,

fundamental problems with predictive layout

2012-09-03 Thread Andrei
You can build any layout in GWT that you can build with plain HTML and CSS, i.e. any layout you like. I build very complex UIs in GWT, and I very rarely use resize handlers or getOffsetWidth()/getOffsetHeight() methods, because: (a) I use a layout panel for page structure, an it resizes by

Re: fundamental problems with predictive layout

2012-09-03 Thread Magnus
Am Montag, 3. September 2012 14:08:27 UTC+2 schrieb Andrei: Maybe if you can give a specific example of a problem you face, we can suggest a solution. Hello, I actually need a composite panel TournamentField that consists of two widgets, a label and a button at the right of the label. I

Re: fundamental problems with predictive layout

2012-09-03 Thread Magnus
Am Montag, 3. September 2012 10:09:45 UTC+2 schrieb Ümit Seren: How about using nested LayoutPanels? Or if you don't want to use LayoutPanels all the way but need resizing in one of the inner widget you could wrap it in a

Re: fundamental problems with predictive layout

2012-09-03 Thread Ümit Seren
Are you changing the sizes of the layoutPanels dynamically? Because if you don't it should work out of the box. If you are changing it dynamically then you might run into this bug (http://code.google.com/p/google-web-toolkit/issues/detail?id=7188). I found following code snippet in one of my

Re: fundamental problems with predictive layout

2012-09-03 Thread Jens
In pure HTML I would do it like: http://jsfiddle.net/EHCGu/ you can drag the vertical splitter to change the size of the result and the label div fills all the space while the button is float:right. No need to use any onResize() JavaScript as the browser takes care of the size. Maybe you can

Re: fundamental problems with predictive layout

2012-09-03 Thread Kara Rawsonkara
you have to call force layout to calc sizes in the new space. k Sent from my iPhone On Sep 1, 2012, at 6:09 PM, Magnus alpineblas...@googlemail.com wrote: Hi, since I use GWT I have a fundamental problem with implementing a predictive layout. I did many resize operations using the

Re: fundamental problems with predictive layout

2012-09-03 Thread Andrei
Magnus, Jens is right: all you need is a simple FlowPanel with a Label and a button inside. Set the button style to float: right, set its width (which, I assume, is constant), and add a right margin to your label which is wider than the button. That's it. Your generated code will be 10 times

Re: fundamental problems with predictive layout

2012-09-03 Thread Magnus
Am Montag, 3. September 2012 16:41:16 UTC+2 schrieb Jens: http://jsfiddle.net/EHCGu/ you can drag the vertical splitter to change the size of the result and the label div fills all the space while the button is float:right. No need to use any onResize() JavaScript as the browser takes

Re: fundamental problems with predictive layout

2012-09-03 Thread Magnus
Am Montag, 3. September 2012 23:25:04 UTC+2 schrieb Andrei: Magnus, Jens is right: all you need is a simple FlowPanel with a Label and a button inside. Set the button style to float: right, set its width (which, I assume, is constant), and add a right margin to your label which is

fundamental problems with predictive layout

2012-09-01 Thread Magnus
Hi, since I use GWT I have a fundamental problem with implementing a predictive layout. I did many resize operations using the onResize method. This method is called whenever a widget is resized. This is fine. However, it is only possible to react on a resize event if one knows the new sizes!!