On 6 oct, 21:40, Jason Calabrese <[EMAIL PROTECTED]> wrote: > All, > > In an application I'm working on we're using several Decorated > widgets. It would be nice if there was a DecoratedCaptionPanel > widget. > > I've done a little searching an can't find an implementation of this > out there. Has anyone created something like this? > > From looking at the code for the existing CaptionPanel it seems like > this should be as easy as swapping a DecoratorPanel for the > SimplePanel, but I have a feeling that there is more to it than this.
CaptionPanel is a <fieldset>+<legend>, so is somehow limited in styling (the border is the default rendering of the <fieldset> and the <legend> positionning is browser-controlled too). A DecoratedCaptionPanel would have to contain a caption which is not a <legend>, and allow styling. If you'd like something looking like a CaptionPanel but with DecoratorPanel-looking "borders", it would involve positionning the caption, which isn't that easy to do in a cross-browser way. I could however understand the need for a widget looking like a DialogBox without the "popup" positionning behavior (i.e. like a DecoratorPanel but with a caption in the .topCenter cell). This is fortunately quite easy to code by yourself: derive DecoratorPanel and copy the code from the DialogBox constructor to initialize the caption. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
