mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-05-15 14:16:07 -06:00
.reference/SplitterFrame : one more example with offten usable situation
git-svn-id: svn://ultimatepp.org/upp/trunk@3236 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
parent
ea05b6ec1f
commit
78bbfefc3e
4 changed files with 56 additions and 0 deletions
12
reference/SplitterFrame1/SplitterFrame1.upp
Normal file
12
reference/SplitterFrame1/SplitterFrame1.upp
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
description "Resizable frame Ctrls\377";
|
||||
|
||||
uses
|
||||
CtrlLib;
|
||||
|
||||
file
|
||||
StandardLayout.lay,
|
||||
main.cpp;
|
||||
|
||||
mainconfig
|
||||
"" = "GUI";
|
||||
|
||||
8
reference/SplitterFrame1/StandardLayout.lay
Normal file
8
reference/SplitterFrame1/StandardLayout.lay
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
LAYOUT(StandardLayout, 396, 192)
|
||||
ITEM(Button, ok, SetLabel(t_("OK")).SetFont(StdFont().Bold()).LeftPosZ(12, 96).BottomPosZ(13, 27))
|
||||
ITEM(Button, cancel, SetLabel(t_("Cancel")).RightPosZ(12, 68).BottomPosZ(13, 19))
|
||||
ITEM(Label, dv___2, SetLabel(t_("label:")).SetAlign(ALIGN_RIGHT).LeftPosZ(12, 48).TopPosZ(20, 20))
|
||||
ITEM(EditString, estr, HSizePosZ(64, 12).TopPosZ(20, 19))
|
||||
ITEM(LabelBox, dv___4, SetLabel(t_("Standard Layout")).SetInk(LtBlue).HSizePosZ(4, 4).VSizePosZ(4, 4))
|
||||
END_LAYOUT
|
||||
|
||||
4
reference/SplitterFrame1/init
Normal file
4
reference/SplitterFrame1/init
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
#ifndef _SplitterFrame1_icpp_init_stub
|
||||
#define _SplitterFrame1_icpp_init_stub
|
||||
#include "CtrlLib/init"
|
||||
#endif
|
||||
32
reference/SplitterFrame1/main.cpp
Normal file
32
reference/SplitterFrame1/main.cpp
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
#include <CtrlLib/CtrlLib.h>
|
||||
|
||||
using namespace Upp;
|
||||
#define LAYOUTFILE <SplitterFrame1/StandardLayout.lay>
|
||||
#include <CtrlCore/lay.h>
|
||||
|
||||
struct MyApp : WithStandardLayout<TopWindow> {
|
||||
SplitterFrame sf;
|
||||
ArrayCtrl list,list1;
|
||||
typedef MyApp CLASSNAME;
|
||||
TopWindow app;
|
||||
|
||||
MyApp() {
|
||||
CtrlLayoutOKCancel(*this, "Test SplitterFrame");
|
||||
AddFrame(sf.Left(list, 200));
|
||||
list.AddColumn("List");
|
||||
for(int i = 0; i < 100; i++)
|
||||
list.Add(FormatIntRoman(i, true));
|
||||
AddFrame(InsetFrame());
|
||||
sf.SizeMin(200).MinSize(100);
|
||||
Sizeable();
|
||||
|
||||
}
|
||||
};
|
||||
|
||||
GUI_APP_MAIN
|
||||
{
|
||||
MyApp().Run();
|
||||
}
|
||||
|
||||
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue