mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-08-23 06:13:07 -06:00
reference: SelectFile example
git-svn-id: svn://ultimatepp.org/upp/trunk@1675 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
parent
d5c0302df5
commit
cf582bd628
3 changed files with 37 additions and 0 deletions
22
reference/SelectFile/main.cpp
Normal file
22
reference/SelectFile/main.cpp
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
#include <CtrlLib/CtrlLib.h>
|
||||
|
||||
using namespace Upp;
|
||||
|
||||
GUI_APP_MAIN
|
||||
{
|
||||
PromptOK(DeQtf(SelectFileOpen("Text files\t*.txt\nAll files\t*.*")));
|
||||
|
||||
PromptOK(DeQtf(SelectFileSaveAs("Text files\t*.txt\nAll files\t*.*")));
|
||||
|
||||
SelectFileIn in("Text files\t*.txt");
|
||||
if(in) {
|
||||
int n = 0;
|
||||
while(!in.IsEof()) {
|
||||
in.GetLine();
|
||||
n++;
|
||||
}
|
||||
PromptOK("There is " + AsString(n) + " lines in the file.");
|
||||
}
|
||||
|
||||
PromptOK("[{1} \1" + SelectLoadFile("Text files\t*.txt"));
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue