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 » U++ Library support » FileSel&FileList, Path » FileSel file seting
FileSel file seting [message #26586] Thu, 13 May 2010 11:05 Go to next message
koldo is currently offline  koldo
Messages: 2922
Registered: August 2008
Veteran
Hello Mirek

A very small fix and a question.

- After last changes line "const char *fs = " Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Shel l Folders" in FileSel.cpp seems not to be necessary.

- I wanted to set "file" field before an ExecuteOpen() to be the by default file, but I do not know how as Update() function deletes it:

void FileSel::Update() {
	String fn;
	if(list.IsSelection()) {
		for(int i = 0; i < list.GetCount(); i++)
			if(list.IsSelected(i))
				Catq(fn, list[i].name);
	}
	else
	if(list.IsCursor()) {
		const FileList::File& m = list[list.GetCursor()];
		if(!m.isdir)
			Catq(fn, m.name);
	}
	if(mode == OPEN)
		file <<= fn;
...		

As fn is empty because FileSel window is just open and user has not selected anything, file <<= fn; always deletes it.



Best regards
Iñaki
Re: FileSel file seting [message #26589 is a reply to message #26586] Thu, 13 May 2010 15:40 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 11713
Registered: November 2005
Ultimate Member
koldo wrote on Thu, 13 May 2010 05:05

Hello Mirek

A very small fix and a question.

- After last changes line "const char *fs = " Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Shel l Folders" in FileSel.cpp seems not to be necessary.



Thanks, removed.

Quote:


- I wanted to set "file" field before an ExecuteOpen() to be the by default file, but I do not know how as Update() function deletes it:



I believe that what you are looking for is "PreSelect".

Mirek
Re: FileSel file seting [message #26590 is a reply to message #26589] Thu, 13 May 2010 15:43 Go to previous message
koldo is currently offline  koldo
Messages: 2922
Registered: August 2008
Veteran
luzr wrote on Thu, 13 May 2010 15:40

koldo wrote on Thu, 13 May 2010 05:05

Hello Mirek

A very small fix and a question.

- After last changes line "const char *fs = " Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Shel l Folders" in FileSel.cpp seems not to be necessary.



Thanks, removed.

Quote:


- I wanted to set "file" field before an ExecuteOpen() to be the by default file, but I do not know how as Update() function deletes it:



I believe that what you are looking for is "PreSelect".

Mirek


Xcellent! Smile


Best regards
Iñaki
Previous Topic: FEATURE: Desktop / home folder shortcuts in FileSel
Next Topic: Problem with FileSel
Goto Forum:
  


Current Time: Sat Feb 23 08:38:30 CET 2019

Total time taken to generate the page: 0.01021 seconds