mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-07-11 22:03:01 -06:00
Adding uppdev....
git-svn-id: svn://ultimatepp.org/upp/trunk@328 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
parent
0fab880126
commit
351994a6cc
2823 changed files with 619073 additions and 0 deletions
42
uppdev/DropListBug/main.cpp
Normal file
42
uppdev/DropListBug/main.cpp
Normal file
|
|
@ -0,0 +1,42 @@
|
|||
#include <CtrlLib/CtrlLib.h>
|
||||
|
||||
using namespace Upp;
|
||||
|
||||
#define LAYOUTFILE <DropListBug/DropListBug.lay>
|
||||
#include <CtrlCore/lay.h>
|
||||
|
||||
class DropListBug : public WithDropListBugLayout<TopWindow>
|
||||
{
|
||||
private:
|
||||
char chr;
|
||||
|
||||
public:
|
||||
typedef DropListBug CLASSNAME;
|
||||
|
||||
DropListBug()
|
||||
{
|
||||
chr = 'a';
|
||||
CtrlLayout(*this, "Window title");
|
||||
addButton <<= THISBACK(AddButtonClicked);
|
||||
removeButton <<= THISBACK(RemoveButtonClicked);
|
||||
}
|
||||
|
||||
void AddButtonClicked()
|
||||
{
|
||||
dropList.Add(String().Cat() << chr++);
|
||||
dropList.SetIndex(dropList.GetCount() - 1);
|
||||
}
|
||||
|
||||
void RemoveButtonClicked()
|
||||
{
|
||||
if (dropList.GetCount() == 0)
|
||||
return;
|
||||
|
||||
dropList.Remove(dropList.GetIndex());
|
||||
}
|
||||
};
|
||||
|
||||
GUI_APP_MAIN
|
||||
{
|
||||
DropListBug().Run();
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue