Project

General

Profile

Bug #2286 » example.cpp

Markus S, 10/04/2013 09:29 AM

 
namespace
{
class TestLayoutWPushButton
: public WApplication
{
public:
TestLayoutWPushButton( const WEnvironment& env )
: WApplication( env )
{
root()->clear();

WGridLayout* layout = new WGridLayout( root() );
WPushButton* button1 = new WPushButton();
WPushButton* button2 = new WPushButton();

button1->setIcon( "PIC/16x16/shadow/check.png" );
button2->setIcon( "PIC/16x16/shadow/check.png" );
button2->resize( 26, 26 );

layout->addWidget( button1, 0, 0, Wt::AlignRight | Wt::AlignMiddle );
layout->addWidget( button2, 1, 0, Wt::AlignRight | Wt::AlignMiddle );
}
};
}
(1-1/2)