Wt::WPushButton Class Reference

A widget that represents a push button. More...

#include <Wt/WPushButton>

Inheritance diagram for Wt::WPushButton:

Inheritance graph
[legend]

List of all members.

Public Member Functions

 WPushButton (WContainerWidget *parent=0)
 Create a push button with empty label.
 WPushButton (const WString &text, WContainerWidget *parent=0)
 Create a push button with given label.
void setText (const WString &text)
 Set the button text.
const WStringtext () const
 Get the button text.
virtual void refresh ()
 Refresh the widget.


Detailed Description

A widget that represents a push button.

To act on a button click, connect a slot to the clicked() signal.

Usage example:

 Wt::WPushButton *ok = new Wt::WPushButton("Okay");
 ok->clicked().connect(SLOT(ok, Wt::WPushButton::disable));
 ok->clicked().connect(SLOT(this, MyClass::processData));

The widget corresponds to the HTML <button> tag.

WPushButton is an inline widget.


Member Function Documentation

void Wt::WPushButton::refresh (  )  [virtual]

Refresh the widget.

The refresh method is invoked when the locale is changed using WApplication::setLocale() or when the user hit the refresh button.

The widget must actualize its contents in response.

Reimplemented from Wt::WWebWidget.


Generated on Mon Mar 9 08:27:51 2009 for Wt by doxygen 1.5.6