Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » Community » U++ community news and announcements » FileSel::FileCtrl
FileSel::FileCtrl [message #49582] Tue, 06 March 2018 12:27
mirek is currently offline  mirek
Messages: 11991
Registered: November 2005
Ultimate Member
FileCtrl methods allows to insert simple widget into FileSel - for example, to specify format details when saving the file, as demostrated with

reference/FileSelFilCtrl

#include <CtrlLib/CtrlLib.h>

using namespace Upp;

#define LAYOUTFILE <FileSelFileCtrl/format.lay>
#include <CtrlCore/lay.h>

GUI_APP_MAIN
{
	FileSel sel;
	
	sel.Types("Example\t*.ext");
	
	WithFormatCtrlLayout<ParentCtrl> 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);
}


Previous Topic: 2018.1 "alpha"
Next Topic: U++ 2018.1rc1 released
Goto Forum:
  


Current Time: Sun Aug 18 15:30:29 CEST 2019

Total time taken to generate the page: 0.01007 seconds