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;