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 Go to next message
mirek is currently offline  mirek
Messages: 13975
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);
}


Re: FileSel::FileCtrl [message #58187 is a reply to message #49582] Wed, 16 March 2022 11:22 Go to previous message
Pradip is currently offline  Pradip
Messages: 109
Registered: February 2019
Location: India
Experienced Member
This is really nice functionality!

Tried to use NotNull() for the external widget, didn't work. FileSel Acceptor seems not to call TopWindow::Accept(). Any ideas?


Regards,
Pradip
Previous Topic: IME improved support
Next Topic: 2022.1rc1
Goto Forum:
  


Current Time: Thu Mar 28 10:21:05 CET 2024

Total time taken to generate the page: 0.01358 seconds