years ago I had a filemanager with 2 panels, which resized the panels by active /inactive. I am not sure, think it was dolphin under linux. It was great!
I would love to have such a feature in XYplorer again :-)
I have some scripts, doing a bit similar things, but not the same:
Activated by own button, makes the left panel small & the right panel wide.
Code: Select all
"Adjust Pane Size"
if (!get("#800")) { #800; }
if (Get('#800')) {
$current = SetLayout();
$dim = Get('#801', 'Height', 'Width');
$size = RegexMatches($current, 'Pane[12]' . $dim . '=\d+', '+');
$size = RegexReplace($size, 'Pane[12]' . $dim . '=');
$size = Eval($size) ;//+ GetKey('SplitterWidth', 'General');
$sum = 30;
if ($sum>100 OR $sum<5) {echo "not a viable percentage"; end 1==1;}
}
$sum = 100 / $sum;
$percent = Floor($size / $sum);
$remainder= $size - $percent;
SetLayout("Pane1$dim=$percent,Pane2$dim=$remainder"); //msg $percent<crlf>$remainder;
Status "First Pane resized to a $dim of $percent px.",, 'ready';And another one:
Under settings >own event reactions >change panel
Code: Select all
"Adjust Pane Size"
if (!get("#800")) { #800; }
if (Get('#800')) {
$current = SetLayout();
$dim = Get('#801', 'Height', 'Width');
$size = RegexMatches($current, 'Pane[12]' . $dim . '=\d+', '+');
$size = RegexReplace($size, 'Pane[12]' . $dim . '=');
$size = Eval($size) ;//+ GetKey('SplitterWidth', 'General');
$sum = 30;
if ($sum>100 OR $sum<5) {echo "not a viable percentage"; end 1==1;}
}
$sum = 100 / $sum;
$percent = Floor($size / $sum);
$remainder= $size - $percent;
SetLayout("Pane1$dim=$percent,Pane2$dim=$remainder"); //msg $percent<crlf>$remainder;
Status "First Pane resized to a $dim of $percent px.",, 'ready';How can I write a script, which automatically changes the panelsize by activating the panel? Mean, when clicking in the left panel, the size of the left panel gets 70% (and the right panel 30%). And clicking in the right panel, the size of the right panel gets 70% (and the left panel 30%).
Since a week I am searching here, Google, XY-help and so on and experimenting with scripts. But without success.
Please help :-)
And... Because it leeds to wrong clicking when the size immediately changes, I would like to put inside the script a waiting command or similar, is that possible too?
I'll give you kisses for your help ;-)
Surya
XYplorer Beta Club