mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-05-17 06:06:00 -06:00
reference: DropTree example
git-svn-id: svn://ultimatepp.org/upp/trunk@1602 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
parent
cedbea2d15
commit
89e2137cb2
3 changed files with 103 additions and 8 deletions
21
reference/DropTree/main.cpp
Normal file
21
reference/DropTree/main.cpp
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
#include <CtrlLib/CtrlLib.h>
|
||||
|
||||
using namespace Upp;
|
||||
|
||||
GUI_APP_MAIN
|
||||
{
|
||||
TopWindow win;
|
||||
DropTree dt;
|
||||
|
||||
dt->SetRoot(CtrlImg::Home(), "Home");
|
||||
for(int i = 0; i < 10; i++) {
|
||||
int id = dt->Add(0, CtrlImg::Computer(), "Computer " + AsString(i + 1));
|
||||
for(int j = 0; j < i; j++)
|
||||
dt->Add(id, CtrlImg::File(), "File " + AsString(j + 1));
|
||||
}
|
||||
|
||||
dt.AutoResize();
|
||||
|
||||
win.Add(dt.HSizePos().TopPos(0, Ctrl::STDSIZE));
|
||||
win.Run();
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue