From c702b39d03496c39314b6bc9fb97d7b9cd1202e1 Mon Sep 17 00:00:00 2001 From: cxl Date: Fri, 23 Mar 2018 09:59:17 +0000 Subject: [PATCH] .reference git-svn-id: svn://ultimatepp.org/upp/trunk@11863 f0d560ea-af0d-0410-9eb7-867de7ffcac7 --- reference/FileSelFileCtrl/FileSelFileCtrl.upp | 12 +++++++++ reference/FileSelFileCtrl/format.lay | 5 ++++ reference/FileSelFileCtrl/main.cpp | 25 +++++++++++++++++++ reference/OptionBox/OptionBox.upp | 2 ++ 4 files changed, 44 insertions(+) create mode 100644 reference/FileSelFileCtrl/FileSelFileCtrl.upp create mode 100644 reference/FileSelFileCtrl/format.lay create mode 100644 reference/FileSelFileCtrl/main.cpp diff --git a/reference/FileSelFileCtrl/FileSelFileCtrl.upp b/reference/FileSelFileCtrl/FileSelFileCtrl.upp new file mode 100644 index 000000000..e73790d04 --- /dev/null +++ b/reference/FileSelFileCtrl/FileSelFileCtrl.upp @@ -0,0 +1,12 @@ +description "Uses FileSel::FileCtrl to add widgets to FileSel\377"; + +uses + CtrlLib; + +file + format.lay, + main.cpp; + +mainconfig + "" = "GUI"; + diff --git a/reference/FileSelFileCtrl/format.lay b/reference/FileSelFileCtrl/format.lay new file mode 100644 index 000000000..7f5e8e10b --- /dev/null +++ b/reference/FileSelFileCtrl/format.lay @@ -0,0 +1,5 @@ +LAYOUT(FormatCtrlLayout, 164, 16) + ITEM(Label, dv___0, SetLabel(t_("Encoding")).LeftPosZ(0, 52).TopPosZ(0, 19)) + ITEM(DropList, list, LeftPosZ(52, 112).TopPosZ(0, 19)) +END_LAYOUT + diff --git a/reference/FileSelFileCtrl/main.cpp b/reference/FileSelFileCtrl/main.cpp new file mode 100644 index 000000000..638c15e59 --- /dev/null +++ b/reference/FileSelFileCtrl/main.cpp @@ -0,0 +1,25 @@ +#include + +using namespace Upp; + +#define LAYOUTFILE +#include + +GUI_APP_MAIN +{ + FileSel sel; + + sel.Types("Example\t*.ext"); + + WithFormatCtrlLayout format; + CtrlLayout(format); + format.list.Add("First"); + format.list.Add("Second"); + format.list.GoBegin(); + + sel.FileCtrl(format); + + if(sel.ExecuteSaveAs()) + PromptOK(String() << "Path: [* \1" << ~sel << "\1]&" + << "Format: [* \1" << ~format.list); +} diff --git a/reference/OptionBox/OptionBox.upp b/reference/OptionBox/OptionBox.upp index 2cf1cd3b6..400427476 100644 --- a/reference/OptionBox/OptionBox.upp +++ b/reference/OptionBox/OptionBox.upp @@ -1,3 +1,5 @@ +description "Demonstrates OptionBox\377"; + uses CtrlLib;