Re: ScrollPanel maxWidth or maxHeight?
I don't know if it still relevant, but I had the same problem and I found a solution. I have small popup (my Class extends DialogBox). Inside the popup, I have a VerticalPanel. Inside this panel is a ScrollPanel and a HorizontalPanel for some buttons. Inside the ScrollPanel is a FlexTable. Now, the user can add and remove rows in the FlexTable. I want to grow the Dialog a bit, but when it gets too large, I want the ScrollPanel to have a fixed height so that the scrollbars appear. When the user removes elements from the table and gets beyond the critical height, I want the dialog to shrink. It's quite easy. Here is how I achieved it. private void handlePanelHeight() { String height = null; if (table.getOffsetHeight() MAX_PANEL_HEIGHT) { height = String.valueOf(MAX_PANEL_HEIGHT); } else { height = String.valueOf(table.getOffsetHeight()); } DOM.setStyleAttribute(scrollPanel.getElement(), height, height); } In my example, I set MAX_PANEL_HEIGHT to 250. I call this method when - the dialog is opened - the user adds a row - the user removes a row I hope this helps. Best regards Denny -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscr...@googlegroups.com. To post to this group, send email to google-web-toolkit@googlegroups.com. Visit this group at http://groups.google.com/group/google-web-toolkit. For more options, visit https://groups.google.com/d/optout.
Re: ScrollPanel maxWidth or maxHeight?
I see, I will try it - thank you all for your help. On 6 Feb., 19:32, gregor greg.power...@googlemail.com wrote: Oh right... I think you've got to make sure that the whatever the ScrollPanel contains has actually reduced in size already - if it hasn't the ScrollPanel will refuse to cooperate (i.e. it won't squash it's contents by itself). Then you need to reset it to 1px more than the height/width of its contents (1px is fine if contents is now 0) in order to get rid of the scroll bars (0px etc is ignored as I recall). It won't do that by itself. After that you'll have to try things out - I've always reset ScrollPanel's to a specific height after this procedure, so I don't know how to release it from the 1px instruction without specifying another. I think I would use debugger to find out exact style properties of ScrollPanel whilst it's in growing mode to start with, and attempt to replicate that. If it has nothing in height/width you may have a problem because, as you say, you may not be allowed to actually remove a style attribute once it's there, only modify it, in which case the ScrollPanel may stubbornly refuse to cooperate. You might be forced to attempt a detach of the items widget, replace ScollPanel with a new one, and reattach the items widget to it, or some such... or you might consider another way to do this altogether - ScrollPanel's can be tiresome, uncooperative widgets at times ;-) On Feb 6, 3:46 pm, Davsket g.ave...@gmail.com wrote: well, at least replace it.. On 6 feb, 10:41, alex.d alex.dukhov...@googlemail.com wrote: Haven't found one either. But checking height while adding elements is ok - have it almoust working already. Well, almoust - the problem is that when height or width properties are set once, you can't take it back. So, while panel shows the desired behaviour while adding elements, it remains big when elements are removed. I've already tried: scrollPanel.setWidth(); scrollPanel.setWidth(null); but no luck. I've also tried to set the style-attribute directly with DOM.setStyleAttribute(scrollPanel.getElement(), width, ); but no luck either. Sadly, i haven't found a removeStyleAttribute-method. Any ideas? Thx On 6 Feb., 15:23, gregor greg.power...@googlemail.com wrote: Is there a real browser-event or should i just call a check procedure whenever i add elements? The latter, no browser event available AFAIK. I have looked in vain for a general method to get ScrollPanels to resize and generally behave by themselves. I think the reason is that individual divs/table cells etc do not generate events when their size changes. ScrollPanel is basically a div with an overflow setting. I have supposed this is because there can be hundreds if not thousands of boxes on a page, so if they all emitted an event every time they changed their width/heights the browser's event queue would be brought to its knees. On Feb 5, 4:13 pm, Litty Preeth preeth.h...@gmail.com wrote: there is some max-height CSS property. But dont know if it works. On Thu, Feb 5, 2009 at 8:59 PM, alex.d alex.dukhov...@googlemail.comwrote: On 5 Feb., 16:10, gregor greg.power...@googlemail.com wrote: Hi Alex, I think you have to explicitly specify the height of a ScollPanel in pixels to get the scroll bars to kick in, and that will set the height of the panel from the word go. If what you mean is that you want a panel to start at a minimum size, then grow as things are added to it, but then to stop growing and go into scroll mode at a certain point, exactly what i meant. I do not think that is realistically possible since there is no event you can listen for that would tell you when the panel had grown to a given height. You can listen for the browser window changing, but not for an individual panel. I suppose one approach might be to set up a timer to check the current height at intervals and take appropriate action when it hit the limit, but this sounds very inefficient. Indeed it does. I kind of hoped somebody will have a genious idea about it ;-) Thank you for your input anyway. regards gregor On Feb 5, 9:29 am, alex.d alex.dukhov...@googlemail.com wrote: Hi folks, I'm trying to impelement a scrollpanel that becomes bigger (height) to the certain size (maxHeight) when populating it with data. After that vertical scrollbar should appear and the panel should stop growing. Any ideas on how to implement this would be appreciated.
Re: ScrollPanel maxWidth or maxHeight?
Is there a real browser-event or should i just call a check procedure whenever i add elements? The latter, no browser event available AFAIK. I have looked in vain for a general method to get ScrollPanels to resize and generally behave by themselves. I think the reason is that individual divs/table cells etc do not generate events when their size changes. ScrollPanel is basically a div with an overflow setting. I have supposed this is because there can be hundreds if not thousands of boxes on a page, so if they all emitted an event every time they changed their width/heights the browser's event queue would be brought to its knees. On Feb 5, 4:13 pm, Litty Preeth preeth.h...@gmail.com wrote: there is some max-height CSS property. But dont know if it works. On Thu, Feb 5, 2009 at 8:59 PM, alex.d alex.dukhov...@googlemail.comwrote: On 5 Feb., 16:10, gregor greg.power...@googlemail.com wrote: Hi Alex, I think you have to explicitly specify the height of a ScollPanel in pixels to get the scroll bars to kick in, and that will set the height of the panel from the word go. If what you mean is that you want a panel to start at a minimum size, then grow as things are added to it, but then to stop growing and go into scroll mode at a certain point, exactly what i meant. I do not think that is realistically possible since there is no event you can listen for that would tell you when the panel had grown to a given height. You can listen for the browser window changing, but not for an individual panel. I suppose one approach might be to set up a timer to check the current height at intervals and take appropriate action when it hit the limit, but this sounds very inefficient. Indeed it does. I kind of hoped somebody will have a genious idea about it ;-) Thank you for your input anyway. regards gregor On Feb 5, 9:29 am, alex.d alex.dukhov...@googlemail.com wrote: Hi folks, I'm trying to impelement a scrollpanel that becomes bigger (height) to the certain size (maxHeight) when populating it with data. After that vertical scrollbar should appear and the panel should stop growing. Any ideas on how to implement this would be appreciated. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to Google-Web-Toolkit@googlegroups.com To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~--~~~~--~~--~--~---
Re: ScrollPanel maxWidth or maxHeight?
Haven't found one either. But checking height while adding elements is ok - have it almoust working already. Well, almoust - the problem is that when height or width properties are set once, you can't take it back. So, while panel shows the desired behaviour while adding elements, it remains big when elements are removed. I've already tried: scrollPanel.setWidth(); scrollPanel.setWidth(null); but no luck. I've also tried to set the style-attribute directly with DOM.setStyleAttribute(scrollPanel.getElement(), width, ); but no luck either. Sadly, i haven't found a removeStyleAttribute-method. Any ideas? Thx On 6 Feb., 15:23, gregor greg.power...@googlemail.com wrote: Is there a real browser-event or should i just call a check procedure whenever i add elements? The latter, no browser event available AFAIK. I have looked in vain for a general method to get ScrollPanels to resize and generally behave by themselves. I think the reason is that individual divs/table cells etc do not generate events when their size changes. ScrollPanel is basically a div with an overflow setting. I have supposed this is because there can be hundreds if not thousands of boxes on a page, so if they all emitted an event every time they changed their width/heights the browser's event queue would be brought to its knees. On Feb 5, 4:13 pm, Litty Preeth preeth.h...@gmail.com wrote: there is some max-height CSS property. But dont know if it works. On Thu, Feb 5, 2009 at 8:59 PM, alex.d alex.dukhov...@googlemail.comwrote: On 5 Feb., 16:10, gregor greg.power...@googlemail.com wrote: Hi Alex, I think you have to explicitly specify the height of a ScollPanel in pixels to get the scroll bars to kick in, and that will set the height of the panel from the word go. If what you mean is that you want a panel to start at a minimum size, then grow as things are added to it, but then to stop growing and go into scroll mode at a certain point, exactly what i meant. I do not think that is realistically possible since there is no event you can listen for that would tell you when the panel had grown to a given height. You can listen for the browser window changing, but not for an individual panel. I suppose one approach might be to set up a timer to check the current height at intervals and take appropriate action when it hit the limit, but this sounds very inefficient. Indeed it does. I kind of hoped somebody will have a genious idea about it ;-) Thank you for your input anyway. regards gregor On Feb 5, 9:29 am, alex.d alex.dukhov...@googlemail.com wrote: Hi folks, I'm trying to impelement a scrollpanel that becomes bigger (height) to the certain size (maxHeight) when populating it with data. After that vertical scrollbar should appear and the panel should stop growing. Any ideas on how to implement this would be appreciated. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to Google-Web-Toolkit@googlegroups.com To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~--~~~~--~~--~--~---
Re: ScrollPanel maxWidth or maxHeight?
well, at least replace it.. On 6 feb, 10:41, alex.d alex.dukhov...@googlemail.com wrote: Haven't found one either. But checking height while adding elements is ok - have it almoust working already. Well, almoust - the problem is that when height or width properties are set once, you can't take it back. So, while panel shows the desired behaviour while adding elements, it remains big when elements are removed. I've already tried: scrollPanel.setWidth(); scrollPanel.setWidth(null); but no luck. I've also tried to set the style-attribute directly with DOM.setStyleAttribute(scrollPanel.getElement(), width, ); but no luck either. Sadly, i haven't found a removeStyleAttribute-method. Any ideas? Thx On 6 Feb., 15:23, gregor greg.power...@googlemail.com wrote: Is there a real browser-event or should i just call a check procedure whenever i add elements? The latter, no browser event available AFAIK. I have looked in vain for a general method to get ScrollPanels to resize and generally behave by themselves. I think the reason is that individual divs/table cells etc do not generate events when their size changes. ScrollPanel is basically a div with an overflow setting. I have supposed this is because there can be hundreds if not thousands of boxes on a page, so if they all emitted an event every time they changed their width/heights the browser's event queue would be brought to its knees. On Feb 5, 4:13 pm, Litty Preeth preeth.h...@gmail.com wrote: there is some max-height CSS property. But dont know if it works. On Thu, Feb 5, 2009 at 8:59 PM, alex.d alex.dukhov...@googlemail.comwrote: On 5 Feb., 16:10, gregor greg.power...@googlemail.com wrote: Hi Alex, I think you have to explicitly specify the height of a ScollPanel in pixels to get the scroll bars to kick in, and that will set the height of the panel from the word go. If what you mean is that you want a panel to start at a minimum size, then grow as things are added to it, but then to stop growing and go into scroll mode at a certain point, exactly what i meant. I do not think that is realistically possible since there is no event you can listen for that would tell you when the panel had grown to a given height. You can listen for the browser window changing, but not for an individual panel. I suppose one approach might be to set up a timer to check the current height at intervals and take appropriate action when it hit the limit, but this sounds very inefficient. Indeed it does. I kind of hoped somebody will have a genious idea about it ;-) Thank you for your input anyway. regards gregor On Feb 5, 9:29 am, alex.d alex.dukhov...@googlemail.com wrote: Hi folks, I'm trying to impelement a scrollpanel that becomes bigger (height) to the certain size (maxHeight) when populating it with data. After that vertical scrollbar should appear and the panel should stop growing. Any ideas on how to implement this would be appreciated. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to Google-Web-Toolkit@googlegroups.com To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~--~~~~--~~--~--~---
Re: ScrollPanel maxWidth or maxHeight?
Oh right... I think you've got to make sure that the whatever the ScrollPanel contains has actually reduced in size already - if it hasn't the ScrollPanel will refuse to cooperate (i.e. it won't squash it's contents by itself). Then you need to reset it to 1px more than the height/width of its contents (1px is fine if contents is now 0) in order to get rid of the scroll bars (0px etc is ignored as I recall). It won't do that by itself. After that you'll have to try things out - I've always reset ScrollPanel's to a specific height after this procedure, so I don't know how to release it from the 1px instruction without specifying another. I think I would use debugger to find out exact style properties of ScrollPanel whilst it's in growing mode to start with, and attempt to replicate that. If it has nothing in height/width you may have a problem because, as you say, you may not be allowed to actually remove a style attribute once it's there, only modify it, in which case the ScrollPanel may stubbornly refuse to cooperate. You might be forced to attempt a detach of the items widget, replace ScollPanel with a new one, and reattach the items widget to it, or some such... or you might consider another way to do this altogether - ScrollPanel's can be tiresome, uncooperative widgets at times ;-) On Feb 6, 3:46 pm, Davsket g.ave...@gmail.com wrote: well, at least replace it.. On 6 feb, 10:41, alex.d alex.dukhov...@googlemail.com wrote: Haven't found one either. But checking height while adding elements is ok - have it almoust working already. Well, almoust - the problem is that when height or width properties are set once, you can't take it back. So, while panel shows the desired behaviour while adding elements, it remains big when elements are removed. I've already tried: scrollPanel.setWidth(); scrollPanel.setWidth(null); but no luck. I've also tried to set the style-attribute directly with DOM.setStyleAttribute(scrollPanel.getElement(), width, ); but no luck either. Sadly, i haven't found a removeStyleAttribute-method. Any ideas? Thx On 6 Feb., 15:23, gregor greg.power...@googlemail.com wrote: Is there a real browser-event or should i just call a check procedure whenever i add elements? The latter, no browser event available AFAIK. I have looked in vain for a general method to get ScrollPanels to resize and generally behave by themselves. I think the reason is that individual divs/table cells etc do not generate events when their size changes. ScrollPanel is basically a div with an overflow setting. I have supposed this is because there can be hundreds if not thousands of boxes on a page, so if they all emitted an event every time they changed their width/heights the browser's event queue would be brought to its knees. On Feb 5, 4:13 pm, Litty Preeth preeth.h...@gmail.com wrote: there is some max-height CSS property. But dont know if it works. On Thu, Feb 5, 2009 at 8:59 PM, alex.d alex.dukhov...@googlemail.comwrote: On 5 Feb., 16:10, gregor greg.power...@googlemail.com wrote: Hi Alex, I think you have to explicitly specify the height of a ScollPanel in pixels to get the scroll bars to kick in, and that will set the height of the panel from the word go. If what you mean is that you want a panel to start at a minimum size, then grow as things are added to it, but then to stop growing and go into scroll mode at a certain point, exactly what i meant. I do not think that is realistically possible since there is no event you can listen for that would tell you when the panel had grown to a given height. You can listen for the browser window changing, but not for an individual panel. I suppose one approach might be to set up a timer to check the current height at intervals and take appropriate action when it hit the limit, but this sounds very inefficient. Indeed it does. I kind of hoped somebody will have a genious idea about it ;-) Thank you for your input anyway. regards gregor On Feb 5, 9:29 am, alex.d alex.dukhov...@googlemail.com wrote: Hi folks, I'm trying to impelement a scrollpanel that becomes bigger (height) to the certain size (maxHeight) when populating it with data. After that vertical scrollbar should appear and the panel should stop growing. Any ideas on how to implement this would be appreciated. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to Google-Web-Toolkit@googlegroups.com To unsubscribe
Re: ScrollPanel maxWidth or maxHeight?
Hi Alex, I think you have to explicitly specify the height of a ScollPanel in pixels to get the scroll bars to kick in, and that will set the height of the panel from the word go. If what you mean is that you want a panel to start at a minimum size, then grow as things are added to it, but then to stop growing and go into scroll mode at a certain point, I do not think that is realistically possible since there is no event you can listen for that would tell you when the panel had grown to a given height. You can listen for the browser window changing, but not for an individual panel. I suppose one approach might be to set up a timer to check the current height at intervals and take appropriate action when it hit the limit, but this sounds very inefficient. regards gregor On Feb 5, 9:29 am, alex.d alex.dukhov...@googlemail.com wrote: Hi folks, I'm trying to impelement a scrollpanel that becomes bigger (height) to the certain size (maxHeight) when populating it with data. After that vertical scrollbar should appear and the panel should stop growing. Any ideas on how to implement this would be appreciated. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to Google-Web-Toolkit@googlegroups.com To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~--~~~~--~~--~--~---
Re: ScrollPanel maxWidth or maxHeight?
On 5 Feb., 16:10, gregor greg.power...@googlemail.com wrote: Hi Alex, I think you have to explicitly specify the height of a ScollPanel in pixels to get the scroll bars to kick in, and that will set the height of the panel from the word go. If what you mean is that you want a panel to start at a minimum size, then grow as things are added to it, but then to stop growing and go into scroll mode at a certain point, exactly what i meant. I do not think that is realistically possible since there is no event you can listen for that would tell you when the panel had grown to a given height. You can listen for the browser window changing, but not for an individual panel. I suppose one approach might be to set up a timer to check the current height at intervals and take appropriate action when it hit the limit, but this sounds very inefficient. Indeed it does. I kind of hoped somebody will have a genious idea about it ;-) Thank you for your input anyway. regards gregor On Feb 5, 9:29 am, alex.d alex.dukhov...@googlemail.com wrote: Hi folks, I'm trying to impelement a scrollpanel that becomes bigger (height) to the certain size (maxHeight) when populating it with data. After that vertical scrollbar should appear and the panel should stop growing. Any ideas on how to implement this would be appreciated. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to Google-Web-Toolkit@googlegroups.com To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~--~~~~--~~--~--~---
Re: ScrollPanel maxWidth or maxHeight?
there is some max-height CSS property. But dont know if it works. On Thu, Feb 5, 2009 at 8:59 PM, alex.d alex.dukhov...@googlemail.comwrote: On 5 Feb., 16:10, gregor greg.power...@googlemail.com wrote: Hi Alex, I think you have to explicitly specify the height of a ScollPanel in pixels to get the scroll bars to kick in, and that will set the height of the panel from the word go. If what you mean is that you want a panel to start at a minimum size, then grow as things are added to it, but then to stop growing and go into scroll mode at a certain point, exactly what i meant. I do not think that is realistically possible since there is no event you can listen for that would tell you when the panel had grown to a given height. You can listen for the browser window changing, but not for an individual panel. I suppose one approach might be to set up a timer to check the current height at intervals and take appropriate action when it hit the limit, but this sounds very inefficient. Indeed it does. I kind of hoped somebody will have a genious idea about it ;-) Thank you for your input anyway. regards gregor On Feb 5, 9:29 am, alex.d alex.dukhov...@googlemail.com wrote: Hi folks, I'm trying to impelement a scrollpanel that becomes bigger (height) to the certain size (maxHeight) when populating it with data. After that vertical scrollbar should appear and the panel should stop growing. Any ideas on how to implement this would be appreciated. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to Google-Web-Toolkit@googlegroups.com To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~--~~~~--~~--~--~---
Re: ScrollPanel maxWidth or maxHeight?
Oh, in your use case, Alex, you do have an event - adding an item to the panel. Just check the height after new item added and set the height of the ScrollPanel in pixels if max value reached I would think answers. I have looked in vain for a general method to get ScrollPanels to resize and generally behave by themselves. I think the reason is that individual divs/table cells etc do not generate events when their size changes. ScrollPanel is basically a div with an overflow setting. I have supposed this is because there can be hundreds if not thousands of boxes on a page, so if they all emitted an event every time they changed their width/heights the browser's event queue would be brought to its knees. On Feb 5, 4:13 pm, Litty Preeth preeth.h...@gmail.com wrote: there is some max-height CSS property. But dont know if it works. On Thu, Feb 5, 2009 at 8:59 PM, alex.d alex.dukhov...@googlemail.comwrote: On 5 Feb., 16:10, gregor greg.power...@googlemail.com wrote: Hi Alex, I think you have to explicitly specify the height of a ScollPanel in pixels to get the scroll bars to kick in, and that will set the height of the panel from the word go. If what you mean is that you want a panel to start at a minimum size, then grow as things are added to it, but then to stop growing and go into scroll mode at a certain point, exactly what i meant. I do not think that is realistically possible since there is no event you can listen for that would tell you when the panel had grown to a given height. You can listen for the browser window changing, but not for an individual panel. I suppose one approach might be to set up a timer to check the current height at intervals and take appropriate action when it hit the limit, but this sounds very inefficient. Indeed it does. I kind of hoped somebody will have a genious idea about it ;-) Thank you for your input anyway. regards gregor On Feb 5, 9:29 am, alex.d alex.dukhov...@googlemail.com wrote: Hi folks, I'm trying to impelement a scrollpanel that becomes bigger (height) to the certain size (maxHeight) when populating it with data. After that vertical scrollbar should appear and the panel should stop growing. Any ideas on how to implement this would be appreciated. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to Google-Web-Toolkit@googlegroups.com To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~--~~~~--~~--~--~---
Re: ScrollPanel maxWidth or maxHeight?
there is some max-height CSS property. But dont know if it works. Yeh i've tried it (including the expression-trick for IE but it didn't work. On 5 Feb., 17:30, gregor greg.power...@googlemail.com wrote: Oh, in your use case, Alex, you do have an event - adding an item to the panel. Just check the height after new item added and set the height of the ScrollPanel in pixels if max value reached I would think answers. That sounds good actually. Is there a real browser-event or should i just call a check procedure whenever i add elements? I have looked in vain for a general method to get ScrollPanels to resize and generally behave by themselves. I think the reason is that individual divs/table cells etc do not generate events when their size changes. ScrollPanel is basically a div with an overflow setting. I have supposed this is because there can be hundreds if not thousands of boxes on a page, so if they all emitted an event every time they changed their width/heights the browser's event queue would be brought to its knees. On Feb 5, 4:13 pm, Litty Preeth preeth.h...@gmail.com wrote: there is some max-height CSS property. But dont know if it works. On Thu, Feb 5, 2009 at 8:59 PM, alex.d alex.dukhov...@googlemail.comwrote: On 5 Feb., 16:10, gregor greg.power...@googlemail.com wrote: Hi Alex, I think you have to explicitly specify the height of a ScollPanel in pixels to get the scroll bars to kick in, and that will set the height of the panel from the word go. If what you mean is that you want a panel to start at a minimum size, then grow as things are added to it, but then to stop growing and go into scroll mode at a certain point, exactly what i meant. I do not think that is realistically possible since there is no event you can listen for that would tell you when the panel had grown to a given height. You can listen for the browser window changing, but not for an individual panel. I suppose one approach might be to set up a timer to check the current height at intervals and take appropriate action when it hit the limit, but this sounds very inefficient. Indeed it does. I kind of hoped somebody will have a genious idea about it ;-) Thank you for your input anyway. regards gregor On Feb 5, 9:29 am, alex.d alex.dukhov...@googlemail.com wrote: Hi folks, I'm trying to impelement a scrollpanel that becomes bigger (height) to the certain size (maxHeight) when populating it with data. After that vertical scrollbar should appear and the panel should stop growing. Any ideas on how to implement this would be appreciated. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to Google-Web-Toolkit@googlegroups.com To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~--~~~~--~~--~--~---