mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-05-15 06:05:58 -06:00
CtrlLib tutorial: 14.1 minimal window size
This commit is contained in:
parent
7f9f8f985b
commit
1da32a1315
3 changed files with 90 additions and 1 deletions
11
tutorial/Gui14a/Gui14a.upp
Normal file
11
tutorial/Gui14a/Gui14a.upp
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
description "More about logical coordinates\377";
|
||||
|
||||
uses
|
||||
CtrlLib;
|
||||
|
||||
file
|
||||
main.cpp;
|
||||
|
||||
mainconfig
|
||||
"" = "GUI";
|
||||
|
||||
28
tutorial/Gui14a/main.cpp
Normal file
28
tutorial/Gui14a/main.cpp
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
#include <CtrlLib/CtrlLib.h>
|
||||
|
||||
using namespace Upp;
|
||||
|
||||
struct MyAppWindow : TopWindow {
|
||||
Button lt, rt, lb, rb, lv, ht, hv, cb, rc;
|
||||
|
||||
MyAppWindow() {
|
||||
Title("My application with button").Sizeable().SetMinSize(Zsz(600, 400));
|
||||
*this
|
||||
<< lt.SetLabel("left-top").LeftPos(10, 200).TopPos(10, 40)
|
||||
<< rt.SetLabel("right-top").RightPos(10, 200).TopPos(10, 40)
|
||||
<< lb.SetLabel("left-bottom").LeftPos(10, 200).BottomPos(10, 40)
|
||||
<< rb.SetLabel("right-bottom").RightPos(10, 200).BottomPos(10, 40)
|
||||
<< lv.SetLabel("left-vsize").LeftPos(10, 200).VSizePos(60, 60)
|
||||
<< ht.SetLabel("hsize-pos").HSizePos(220, 220).TopPos(10, 40)
|
||||
<< hv.SetLabel("hsize-vsize").HSizePos(220, 220).VSizePos(60, 60)
|
||||
<< cb.SetLabel("hcenter-bottom").HCenterPos(200).BottomPos(10, 40)
|
||||
<< rc.SetLabel("right-vcenter").RightPos(10, 200).VCenterPos(40)
|
||||
;
|
||||
}
|
||||
};
|
||||
|
||||
GUI_APP_MAIN
|
||||
{
|
||||
MyAppWindow app;
|
||||
app.Run();
|
||||
}
|
||||
File diff suppressed because one or more lines are too long
Loading…
Add table
Add a link
Reference in a new issue