ultimatepp/uppdev/SmartButton/main.cpp
cxl 4a1c627474 Adding uppdev....
git-svn-id: svn://ultimatepp.org/upp/trunk@328 f0d560ea-af0d-0410-9eb7-867de7ffcac7
2008-08-15 08:36:24 +00:00

27 lines
536 B
C++

#include <CtrlLib/CtrlLib.h>
class MyApp : public TopWindow {
Button button;
void Click(String s) {
button.SetLabel("I was clicked, YOHOO!");
PromptOK(s);
button <<= THISBACK1(Click, "Button was clicked once again!");
}
public:
typedef MyApp CLASSNAME;
MyApp() {
Title("Testing of Ultimate++");
button.SetRect(100, 100, 200, 50);
button.SetLabel("Click me!");
button <<= THISBACK1(Click, "Button was clicked for the first time.");
Add(button);
}
};
GUI_APP_MAIN
{
MyApp().Run();
}