#include <Wt/WPushButton>
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 WString & | text () const |
Get the button text. | |
virtual void | refresh () |
Refresh the widget. |
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.
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.