.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:
sergeynikitin 2011-02-24 00:02:38 +00:00
parent ea05b6ec1f
commit 78bbfefc3e
4 changed files with 56 additions and 0 deletions

View file

@ -0,0 +1,12 @@
description "Resizable frame Ctrls\377";
uses
CtrlLib;
file
StandardLayout.lay,
main.cpp;
mainconfig
"" = "GUI";

View 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

View file

@ -0,0 +1,4 @@
#ifndef _SplitterFrame1_icpp_init_stub
#define _SplitterFrame1_icpp_init_stub
#include "CtrlLib/init"
#endif

View 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();
}