The method setDeferredRender(boolean) is undefined for the type Panel.
So I can't call
it to the panel which have the cardLayout.Plus I already tried and
tested the setDeferredRendering(false)
on tabPanel as well as the doLayout in the tabPanel and tabs. I also
set the tabPanel to the setHideMode("offset").
I'll try the deckPanel.

II
On Apr 8, 3:42 pm, Patrizio De Michele <[email protected]> wrote:
> from the thread you linked maybe the solution is easy:
> "MY WORKAROUND:...
>
> read more »
>
> I used the "DeckPanel" out of the native GWT widget library"
>
> if you want to continue on this way...
> probable solutions are as usual...call doLayout...
> setDeferredRendering(false) on the cardlayout
> and on tabpanels...and set to do layout on every tab change...
>
> bye pat
>
> 2010/4/8 lanz <[email protected]>
>
>
>
> > I made a progress on this. I used the solution as suggested in
> >http://gwt-ext.com/forum/viewtopic.php?f=8&t=3065&p=9988#p9988.
> > I modify the code. I used the code below:
>
> > //-->> p1 is the panel
> > p1.setHideMode("offsets");
>
> > //<<--
>
> > I was successful in showing the scrollbar in the tabPanel even this
> > tabPanel is not in the 1st card.
> > Unfortunately the tab details or its contents doesn't show unless the
> > tab other than the first tab is clicked. I already tried
> > to set the tabPanel to setHidMode just as I did with the other panels
> > of the cards but still won't show.
>
> > On Apr 6, 4:24 am, "Patrizio De Michele" <[email protected]> wrote:
> > > first take a look at the java sources and try to understand the reason...
> > > if isn't resolved take a look at javascript sources......
> > > i don't have any answer....
> > > i didn't know workarounds....
> > > bye pat
>
> > > In data 05 aprile 2010 alle ore 09:58:25, lanz <[email protected]>
>
> > > ha scritto:
>
> > > > Hi all,
>
> > > > I made a test to the gwt-ext demo on tab panels. I put it in a
> > > > cardLayout
> > > > panel.
>
> > > > import com.google.gwt.core.client.EntryPoint;
> > > > import com.google.gwt.user.client.ui.RootPanel;
> > > > import com.gwtext.client.core.EventObject;
> > > > import com.gwtext.client.widgets.*;
> > > > import com.gwtext.client.widgets.event.ButtonListenerAdapter;
> > > > import com.gwtext.client.widgets.event.TabPanelListenerAdapter;
> > > > import com.gwtext.client.widgets.layout.CardLayout;
> > > > import com.gwtext.client.widgets.layout.VerticalLayout;
> > > > import com.gwtext.client.widgets.menu.BaseItem;
> > > > import com.gwtext.client.widgets.menu.Item;
> > > > import com.gwtext.client.widgets.menu.Menu;
> > > > import com.gwtext.client.widgets.menu.event.BaseItemListenerAdapter;
>
> > > > public class MyTest implements EntryPoint {
>
> > > >     private TabPanel tabPanel;
> > > >     private int index;
> > > >     private Menu menu;
>
> > > >     public void onModuleLoad() {
>
> > > >            try{
> > > >         Panel panel = new Panel();
> > > >         panel.setBorder(false);
> > > >         panel.setPaddings(15);
> > > >         Panel verticalPanel = new Panel();
> > > >         verticalPanel.setLayout(new VerticalLayout(15));
>
> > > >          final Panel mytabPanel = new Panel();//TabPanel -> Panel;
> > > > mytabPanel -> myPanelCardLayout
> > > >             // mytabPanel.setActiveTab(0);
> > > >              mytabPanel.setLayout(new CardLayout());//CardLayout
> > -->>fitlayout
> > > >              mytabPanel.setTitle("Request Wizard");
> > > >              mytabPanel.setPaddings(15);
> > > >              mytabPanel.setHeight(850);
> > > >              mytabPanel.setWidth(850);
>
> > > >              Panel sample1Panel = new Panel();
> > > >          sample1Panel.setTitle("Step 1");
> > > >         // sample1Panel.setAutoHeight(true);
> > > >          sample1Panel.setHeight(800);
> > > >          sample1Panel.setWidth(800);
> > > >          sample1Panel.setId("card-1");
>
> > > >              final Panel detailsPanel = new Panel();
> > > >              detailsPanel.setHeight(800);
> > > >              detailsPanel.setWidth(800);
> > > >              //detailsTab.setAutoScroll(true);
> > > >              detailsPanel.setTitle("Step 2");
> > > >              detailsPanel.setId("card-2");
>
> > > >         Button button = new Button("Add Tab", new
> > > > ButtonListenerAdapter() {
> > > >             public void onClick(Button button, EventObject e) {
> > > >                 Panel tab = addTab();
> > > >                 tabPanel.activate(tab.getId());
> > > >                 tabPanel.scrollToTab(tab, true);
> > > >             }
> > > >         });
> > > >         button.setIconCls("new-tab-icon");
> > > >         //verticalPanel.add(button);
> > > >         sample1Panel.add(button);
> > > >         tabPanel = new TabPanel();
> > > >         tabPanel.setResizeTabs(true);
> > > >         tabPanel.setMinTabWidth(115);
> > > >         tabPanel.setTabWidth(135);
> > > >         tabPanel.setEnableTabScroll(true);
> > > >         tabPanel.setWidth(450);
> > > >         tabPanel.setHeight(250);
> > > >         tabPanel.setActiveTab(0);
>
> > > >         tabPanel.addListener(new TabPanelListenerAdapter() {
> > > >             public void onContextMenu(TabPanel source, Panel tab,
> > > > EventObject e) {
> > > >                 showMenu(tab, e);
> > > >             }
> > > >         });
>
> > > >         for (index = 0; index <13; index++) {
> > > >             addTab();
> > > >         }
>
> > > >         verticalPanel.add(tabPanel);
> > > >         detailsPanel.add(verticalPanel);
> > > >         mytabPanel.add(sample1Panel);
> > > >         mytabPanel.add(detailsPanel);
>
> > > >         //-->>Next and Previous Button
> > > >         ButtonListenerAdapter listener = new ButtonListenerAdapter()
> > > > {
> > > >             public void onClick(Button button, EventObject e) {
> > > >                 String btnID = button.getId();
> > > >                 CardLayout cardLayout = (CardLayout)
> > > > mytabPanel.getLayout();
> > > >                 String panelID =
> > > > cardLayout.getActiveItem().getId();
>
> > > >                 if (btnID.equals("move-prev")) {
> > > >                     if (panelID.equals("card-4")) {
> > > >                         cardLayout.setActiveItem(2);//
> > > > 1>2
>
> > > >                     } else if(panelID.equals("card-3")){
> > > >                         cardLayout.setActiveItem(1);
> > > >                     }else if(panelID.equals("card-2")){
> > > >                         cardLayout.setActiveItem(0);
> > > >                     }
> > > >                 } else {   //move-next
>
> > > >                 if (panelID.equals("card-1")) {
> > > >                     cardLayout.setActiveItem(1);
> > > >                    // detailsPanel.doLayout();
> > > >                    // mytabPanel.doLayout();
> > > >                     //panel.doLayout();
> > > >                 } else if(panelID.equals("card-2")){
> > > >                     cardLayout.setActiveItem(2);
> > > >                    // mytabPanel.doLayout();
> > > >                 }
> > > >               }
> > > >          }
> > > >         };
>
> > > >         Toolbar toolbar = new Toolbar();
>
> > > >         ToolbarButton backButton = new ToolbarButton("Back",
> > > > listener);
> > > >         backButton.setId("move-prev");
> > > >         toolbar.addButton(backButton);
> > > >         toolbar.addFill();
>
> > > >         ToolbarButton nextButton = new ToolbarButton("Next",
> > > > listener);
> > > >         nextButton.setId("move-next");
> > > >         toolbar.addButton(nextButton);
> > > >          mytabPanel.setBottomToolbar(toolbar);
>
> > > >         mytabPanel.setActiveItem(0);
>
> > > >         panel.add(mytabPanel);
>
> > > >         Viewport viewport = new Viewport(panel);
> > > >        // RootPanel.get().add(panel);
> > > >            }catch(Exception ex){
> > > >                    ex.printStackTrace();
> > > >            }
>
> > > >     }
>
> > > >     private void showMenu(final Panel tab, EventObject e) {
> > > >         if (menu == null) {
> > > >             menu = new Menu();
> > > >             Item close = new Item("Close Tab");
> > > >             close.setId("close-tab-item");
> > > >             close.addListener(new BaseItemListenerAdapter() {
> > > >                 public void onClick(BaseItem item, EventObject e) {
> > > >                     tabPanel.remove(tabPanel.getActiveTab());
> > > >                 }
> > > >             });
> > > >             menu.addItem(close);
>
> > > >             Item closeOthers = new Item("Close Other Tabs");
> > > >             closeOthers.setId("close-others-item");
> > > >             closeOthers.addListener(new BaseItemListenerAdapter() {
> > > >                 public void onClick(BaseItem item, EventObject e) {
> > > >                     Component[] items = tabPanel.getItems();
> > > >                     /*for (int i = 0; i < items.length; i++) {
> > > >                         Component component = items[i];
> > > >                         if (!
> > > > component.getId().equals(tabPanel.getActiveTab().getId())) {
> > > >                             tabPanel.remove(component);
> > > >                         }
> > > >                     }
> > > >                     */
> > > >                 }
> > > >             });
> > > >             menu.addItem(closeOthers);
> > > >         }
>
> > > >         BaseItem closeOthers = menu.getItem("close-others-item");
> > > >         if (tabPanel.getItems().length == 1) {
> > > >             closeOthers.disable();
> > > >         } else {
> > > >             closeOthers.enable();
> > > >         }
> > > >         menu.showAt(e.getXY());
> > > >     }
>
> > > >     private Panel addTab() {
> > > >         Panel tab = new Panel();
> > > >         tab.setAutoScroll(true);
> > > >         tab.setTitle("New Tab " + (++index));
> > > >         tab.setIconCls("tab-icon");
> > > >         tab.setHtml("Tab Body " + index + "<br/><br/>" +
> > > > getBogusMarkup());
> > > >         tab.setClosable(true);
> > > >         tabPanel.add(tab);
> > > >         return tab;
> > > >     }
>
> > > >     private static String getBogusMarkup() {
> > > >         return "<p>Lorem ipsum dolor sit amet, consectetuer adipiscing
> > > > elit. " +
> > > >                 "Sed metus nibh, sodales a, porta at, vulputate eget,
> > > > dui.  " +
> > > >                 "In pellentesque nisl non sem. Suspendisse nunc sem,
> > > > pretium eget, " +
> > > >                 "cursus a, fringilla vel, urna.";
> > > >     }
> > > > }
>
> > > > //<<====================
>
> > > > The scrollbar of the tab Panel won't display if its not in the first
> > > > panel of the cardLayout.
> > > > Is there any work around for this? I tried the mytabPanel.doLayout()- 
> > > > Hide quoted text -
>
> - Show quoted text -

-- 
You received this message because you are subscribed to the Google Groups 
"GWT-Ext Developer Forum" 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/gwt-ext?hl=en.

Reply via email to