(About a year ago, I was dealing with a similar problem, which turned out to be 
caused by defining a table border in the CSS file I was using.)

I've attached a simple test program with a button.  Press the button, and you 
get a simple dialog.  When compiling using Wt 3.1.5 (boost 1.44.0)  on CentOS 
5.5, and displaying on Firefox 3.6.10 (on Mac), the dialog box grows with every 
WTimer() callback.   I'm using the same 'resources' directory that is furnished 
with Wt 3.1.5.

Safari 5.0.2 on Mac OS 10.6.4 does *NOT* have this problem.

1) I've disabled all Firefox addons. 
2) I am not referencing any CSS
3) I've removed all the older Wt shared libraries, and recompiled my 
application.
4) I've tried installing Wt from git, as of 2010/10/6

If I disable the "clock" feature using "--noclock" as the first argument, the 
dialog still grows if I resize the window.

I'm using Koen Deforche's suggestion on how to layout the dialog, with an 
explicit size for the dialog.contents().

Any ideas how to fix this?

  void doit()
  {
    WDialog dialog;

    dialog.setWindowTitle( "Edit Processor Parameters" );
    WVBoxLayout  *contentsLayout = new WVBoxLayout();
    dialog.contents()->setLayout( contentsLayout );
    dialog.contents()->resize(WLength(), 100);

    WGridLayout *grid = new WGridLayout();
    contentsLayout->addLayout( grid, 1  /* ,Wt::AlignTop | Wt::AlignJustify */ 
);
    int row = 0;
    WText *label = new WText( "Name" );
    grid->addWidget( label, row, 0 );

    ++row;

    WPushButton *ok = new WPushButton( "OK" );
    WPushButton *cancel = new WPushButton( "Cancel" );
    grid->addWidget( ok, row, 0 );
    grid->addWidget( cancel, row, 1 );
    grid->addWidget( new WPushButton ("Push me!" ), row, 2);

    ok->clicked().connect( SLOT(&dialog, WDialog::accept) );
    cancel->clicked().connect( SLOT(&dialog, WDialog::reject) );

    if (dialog.exec() == WDialog::Accepted) {
      std::cerr << "Accepted" << std::endl;
    }
  }

Attachment: dialogtest2.cpp
Description: Binary data

------------------------------------------------------------------------------
Beautiful is writing same markup. Internet Explorer 9 supports
standards for HTML5, CSS3, SVG 1.1,  ECMAScript5, and DOM L2 & L3.
Spend less time writing and  rewriting code and more time creating great
experiences on the web. Be a part of the beta today.
http://p.sf.net/sfu/beautyoftheweb
_______________________________________________
witty-interest mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/witty-interest

Reply via email to