Hi Koen, 

Thanks for looking into it.
Changing 
Wt::WContainerWidget *contall = new Wt::WContainerWidget(root());
to
Wt::WContainerWidget *contall = root();
was the important part. 
The effect of "setLayoutHint" was less important for me.

But I couldn't apply that to my application. So I did some further
experimentations. But I couldn't get it to work correctly.
I can scroll the tabs out of view, so it look like the problem is indeed
at the WStackedWidget.  

Here is what I have at the moment:
class Testapp_IE : public Wt::WApplication
{
public:
Testapp_IE(const Wt::WEnvironment& env) : Wt::WApplication(env)
{
    Wt::WContainerWidget *contall = root();
    Wt::WBorderLayout *blayout = new Wt::WBorderLayout();
blayout->setLayoutHint("table-layout", "fixed");
contall->setLayout(blayout);

    mainStack_ = new Wt::WStackedWidget();
    blayout->addWidget(mainStack_, Wt::WBorderLayout::Center);

        Wt::WPushButton *btn = new Wt::WPushButton("go", mainStack_);
        btn->clicked().connect(SLOT(this, Testapp_IE::go));
}

    void go()
    {
        Wt::WContainerWidget *contall = new
Wt::WContainerWidget(mainStack_);
Wt::WBorderLayout *blayout = new Wt::WBorderLayout();
blayout->setLayoutHint("table-layout", "fixed");
contall->setLayout(blayout);

Wt::WContainerWidget *contw = new Wt::WContainerWidget();
blayout->addWidget(contw, Wt::WBorderLayout::Center);
Wt::WTabWidget *tabw = new Wt::WTabWidget(contw);

Wt::WContainerWidget *tab1 = new Wt::WContainerWidget();
tabw->addTab(tab1, "Tab1");
Wt::WImage *img1 = new
Wt::WImage("http://www.swissleague.ch/big/sl2486.jpg";);
tab1->addWidget(img1);

Wt::WContainerWidget *tab2 = new Wt::WContainerWidget();
tabw->addTab(tab2, "Tab2");
Wt::WImage *img2 = new
Wt::WImage("http://swissleague.ch/raw/sl2486.jpg";);
tab2->addWidget(img2);

mainStack_->setCurrentWidget(contall);
    }

private:
Wt::WStackedWidget   *mainStack_;
};

I found out that with that particular example, IE, Chrome and Konqueror
all have problems while Firefox and Seamonkey don't.

Rgds
Richard



------------------------------------------------------------------------------
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
_______________________________________________
witty-interest mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/witty-interest

Reply via email to