Project

General

Profile

Bug #844 ยป TestText.cpp

Max Quatember, 05/30/2011 05:17 PM

 
namespace
{
class XText : public Wt::WText
{
public:
XText( std::string s )
: Wt::WText( s )
{
setStyleClass( "test" );
}
};

class TestText
: public Wt::WApplication
{
public:
TestText( const Wt::WEnvironment& env )
: Wt::WApplication( env )
{
Wt::WContainerWidget* c = new Wt::WContainerWidget( root() );
c->resize( 100, 300 );
Wt::WTable* t = new Wt::WTable( c );
styleSheet().addRule( ".test", "font-size: 12px;", ".test" );

t->elementAt( 0, 0 )->addWidget( new XText( "X" ) );
t->elementAt( 0, 1 )->addWidget( new XText( "Test Test Test Test" ) );
}
};
}
    (1-1/1)