mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-08-25 14:22:54 -06:00
Several examples fixed to compile and work in new draw
git-svn-id: svn://ultimatepp.org/upp/trunk@1386 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
parent
bacf2dc0ec
commit
b87ec0e8ff
10 changed files with 46 additions and 25 deletions
|
|
@ -1,23 +1,23 @@
|
|||
#include <CtrlLib/CtrlLib.h>
|
||||
|
||||
using namespace Upp;
|
||||
|
||||
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!");
|
||||
void Click() {
|
||||
if(PromptYesNo("Button was clicked. Do you want to quit?"))
|
||||
Break();
|
||||
}
|
||||
|
||||
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);
|
||||
Title("Hello world");
|
||||
button.SetLabel("Hello world!");
|
||||
button <<= THISBACK(Click);
|
||||
Add(button.HSizePos(100, 100).VSizePos(100, 100));
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue