Page 1 of 1
Tree Highlighting - Text Color and Reveal Folders?
Posted: 30 Nov 2018 16:14
by tom_01
Is it possible to change the text color of a highlighted folder in the tree? I see how to set the highlight color, but haven't found a way to change the color of the text.
And is there a way to reveal (ie expand parent folders down to) highlighted folders in the tree? Highlighting is really helping me quickly navigate complex/long folder structures but if a folder gets collapsed, I can't see them anymore. Can't even find a list of highlighted folders (like managing the Favorites list).
Re: Tree Highlighting - Text Color and Reveal Folders?
Posted: 30 Nov 2018 17:13
by highend
Highlighted by what, labels?
Re: Tree Highlighting - Text Color and Reveal Folders?
Posted: 30 Nov 2018 19:27
by tom_01
Not labels. It's under Favorites > Toggle Highlighted Folder
Re: Tree Highlighting - Text Color and Reveal Folders?
Posted: 30 Nov 2018 19:49
by highend
Possible via scripting
Code: Select all
// Save all settings to a temp .ini file
$ini = "%TEMP%\~XYplorer_temp.ini";
savesettings 1, $ini;
// Get highlighted folder(s)
$highlighted = formatlist(getsectionlist("HiliteFolder", $ini), "ef", <crlf>, "!count=*");
if (!$highlighted) { status "No highlighted folder(s) found, aborted!", "8B4513", "stop"; end true; }
$folders = regexreplace($highlighted, "^(\d+=)(.*?)(>.*?)(?=\r?\n|$)", "$2");
foreach($folder, $folders, <crlf>, "e") {
showintree $folder;
}
delete 0, 0, $ini;
Re: Tree Highlighting - Text Color and Reveal Folders?
Posted: 30 Nov 2018 20:45
by tom_01
Thank you. This is cool. It's working pretty well. It seems to conflict a bit with my mini tree though. When the script expands down to the highlighted folders, it does so with it's own mini-tree, so to speak. If I reset my Mini-tree, then the highlighted folders get collapsed again... Not sure if I'm explaining that well, but I guess I would just like the script to not hide folders so I can control that (which folders get displayed/hidden) with the mini-tree feature myself...
Re: Tree Highlighting - Text Color and Reveal Folders?
Posted: 01 Dec 2018 08:57
by highend
You mean something like this?
Code: Select all
$miniTree = get("#489");
// Save all settings to a temp .ini file
$ini = "%TEMP%\~XYplorer_temp.ini";
savesettings 1, $ini;
// Get highlighted folder(s)
$highlighted = formatlist(getsectionlist("HiliteFolder", $ini), "ef", <crlf>, "!count=*");
if (!$highlighted) { status "No highlighted folder(s) found, aborted!", "8B4513", "stop"; end true; }
$folders = regexreplace($highlighted, "^(\d+=)(.*?)(>.*?)(?=\r?\n|$)", "$2");
foreach($folder, $folders, <crlf>, "e") {
if ($miniTree) { loadtree $folder, 1; }
else { showintree $folder; }
}
delete 0, 0, $ini;
Re: Tree Highlighting - Text Color and Reveal Folders?
Posted: 01 Dec 2018 14:40
by tom_01
Wow this is perfect! Thank you so much.
Re: Tree Highlighting - Text Color and Reveal Folders?
Posted: 28 Dec 2018 21:24
by tom_01
highend wrote: ↑01 Dec 2018 08:57
You mean something like this?
Code: Select all
$miniTree = get("#489");
// Save all settings to a temp .ini file
$ini = "%TEMP%\~XYplorer_temp.ini";
savesettings 1, $ini;
// Get highlighted folder(s)
$highlighted = formatlist(getsectionlist("HiliteFolder", $ini), "ef", <crlf>, "!count=*");
if (!$highlighted) { status "No highlighted folder(s) found, aborted!", "8B4513", "stop"; end true; }
$folders = regexreplace($highlighted, "^(\d+=)(.*?)(>.*?)(?=\r?\n|$)", "$2");
foreach($folder, $folders, <crlf>, "e") {
if ($miniTree) { loadtree $folder, 1; }
else { showintree $folder; }
}
delete 0, 0, $ini;
Hi highend. This script is actually revealing a folder that is neither highlighted nor a mini tree. It used to be highlighted (or a mini tree--I can't remember) but I unhighlighted it and reset the mini tree. Nevertheless, the script is still revealing this folder in my hierarchy. Any ideas?
Thanks!
Re: Tree Highlighting - Text Color and Reveal Folders?
Posted: 28 Dec 2018 21:41
by highend
Which folder is that?
Comment out the delete... line, run the script, show the
HiliteFolder section from the saved temporary .ini file...
Re: Tree Highlighting - Text Color and Reveal Folders?
Posted: 11 Jan 2019 21:24
by tom_01
Thanks--I followed your instructions. It's a folder that's been moved/deleted... Perhaps I didn't un-highlight it before moving/deleting?
Re: Tree Highlighting - Text Color and Reveal Folders?
Posted: 24 Apr 2019 23:44
by tom_01
Any advice?
Re: Tree Highlighting - Text Color and Reveal Folders?
Posted: 13 Sep 2019 10:24
by admin
Text Color customizing has been added in the meantime:
viewtopic.php?f=5&t=20580