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.com>wrote:
>
> > > > > > 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
-~----------~----~----~----~------~----~------~--~---

Reply via email to