Here's the source code for the DialogBox. See not all the stack panel
panels are visible..you need to scroll to see the remaining ones.

Thanks.
--------------------------------------------------------------------------------
import com.google.gwt.user.client.ui.Button;
import com.google.gwt.user.client.ui.DecoratedStackPanel;
import com.google.gwt.user.client.ui.DialogBox;
import com.google.gwt.user.client.ui.HorizontalSplitPanel;
import com.google.gwt.user.client.ui.ScrollPanel;
import com.google.gwt.user.client.ui.VerticalPanel;
import com.google.gwt.user.client.ui.Widget;

public class DialogTest extends DialogBox
{
   public DialogTest()
   {
      setText("Dialog Test");
      setAnimationEnabled(true);

      HorizontalSplitPanel mainSplitPanel = new
HorizontalSplitPanel();
      mainSplitPanel.setSplitPosition("40%");
      mainSplitPanel.setSize("600px", "300px");
      mainSplitPanel.setLeftWidget(getStackPanel()); //
      mainSplitPanel.setRightWidget(new Button("Right panel"));

      setWidget(mainSplitPanel);
   }

   public Widget getStackPanel()
   {
      // dummy content for stack 1
      VerticalPanel stack1Content = new VerticalPanel();
      stack1Content.add(new Button("Stack 1"));
      stack1Content.add(new Button("Stack 1"));
      stack1Content.add(new Button("Stack 1"));
      stack1Content.add(new Button("Stack 1"));
      stack1Content.add(new Button("Stack 1"));
      stack1Content.add(new Button("Stack 1"));
      stack1Content.add(new Button("Stack 1"));
      stack1Content.add(new Button("Stack 1"));
      stack1Content.add(new Button("Stack 1"));
      stack1Content.add(new Button("Stack 1"));
      stack1Content.add(new Button("Stack 1"));

      ScrollPanel scrollPanelStack1 = new ScrollPanel();
      scrollPanelStack1.add(stack1Content);
      scrollPanelStack1.setSize("100%", "100%");

      // stack panel
      DecoratedStackPanel stackPanel = new DecoratedStackPanel();
      stackPanel.add(scrollPanelStack1, "Stack Panel 1");
      stackPanel.add(new Button("Stack 2"), "Stack Panel 2");
      stackPanel.add(new Button("Stack 3"), "Stack Panel 3");
      stackPanel.setSize("100%", "100%");
      return stackPanel;
   }
}
------------------------------------------------------------------


On Nov 4, 3:56 am, sepp maier <[EMAIL PROTECTED]> wrote:
> I have no problems with IE (7.0.5730.13), can you send me a code
> snippet
> for a test.
>
> On 3 Nov., 23:02, Sunil <[EMAIL PROTECTED]> wrote:
>
> > I couldn't find a way to figure out the height to set for the
> > StackPanel in a DialogBox. If it is set to the height of the parent
> > SplitPanel, it appears fine in Safari, but not in IE and Firefox where
> > it always appears larger than the dialog height causing scrolling.
>
> > On Nov 3, 3:28 pm, Sunil <[EMAIL PROTECTED]> wrote:
>
> > > On Nov 3, 12:10 pm, sepp maier <[EMAIL PROTECTED]> wrote:
>
> > > > Hallo Sunil,
>
> > > > On 3 Nov., 15:52, Sunil <[EMAIL PROTECTED]> wrote:
>
> > > > > I am trying to create a DialogBox with a HorizontalSplitPanel, the
> > > > > left side of which contains a StackPanel. I was trying to get the
> > > > > StackPanel to fill the entire left side of the SplitPanel (sort of
> > > > > outlook like), and am having trouble achieving that.
>
> > > > > Question 1:
> > > > > I have to specifically set the height of the StackPanel for it to fill
> > > > > vertically. Setting the height equal to the height of the DialogBox in
> > > > > pixels works perfectly in Firefox and Safari, but in IE the StackPanel
> > > > > appears longer than the DialogBox. I tried to subract the caption
> > > > > height (DialogBox.getAbsoluteTop - SplitPanel.getAbsoluteTop). The
> > > > > StackPanel then appears fine in IE, but appears shorter in Firefox &
> > > > > Safari. How do I set the StackPanel to fill the height of the dialog
> > > > > on all browsers?
>
> > > > Set the height of the splitpanel e.g. "150px"
> > > > Set the height of the stackPanel to "100%"
>
> > > > put this to your css file to overwrite the 100% height panel content
> > > > .gwt-StackPanelContent{
> > > >     height:0;
>
> > > > }
>
> > > Thanks for the help. This works perfectly in safari. However in IE and
> > > Firefox, even though the StackPanel size is set to 100%, the
> > > stackPanel is always longer than the Dialog causing a scrollbar to
> > > appear.
>
> > > > > Question 2:
> > > > > If I add a widget in a ScrollPanel for one of the StackPanel, I see a
> > > > > scrollbar if the height of the widget is longer. What I want is for
> > > > > all the tabs of the StackPanel to be always visible, not matter what
> > > > > the contents of the stacks are. I want the scroll bars to appear
> > > > > inside each panel if needed, not for the entire StackPanel.
>
> > > > I don't understand what you want.
>
> > > > > Any ideas?
>
> > > > > Thanks
> > > > > Sunil.
>
> > > > Regards, Sepp
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to