Can we rename a tab in a script?

Discuss and share scripts and script files...
admin
Site Admin
Posts: 66249
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Re: Can we rename a tab in a script?

Post by admin »

Oh yes, 2 x :oops: and 2 x thanks!

Code: Select all

        style:      1 = show file system icons for the items (= default)
                    2 = show checkboxes
                        prefix items with "+" to pre-check them
Example for pre-checked items:

Code: Select all

text inputselect("Select Drives", "+C:|+D:|E:", , 3);

Stefan
Posts: 1360
Joined: 18 Nov 2008 21:47
Location: Europe

Re: Can we rename a tab in a script?

Post by Stefan »

No need for " :oops: "

Biggynuff
Posts: 110
Joined: 13 May 2010 14:08

Re: Can we rename a tab in a script?

Post by Biggynuff »

Wow . . .

I just wanted to say . . .

. . . Wow :lol:

I now have my tabs all proudly displaying their 'scripted' names. For me, this just makes viewing drives and folders a breeze. Seriously, this makes the visual display of tabs really very useful and speeds up work no end

I'm sat staring at my XY and this is a picture of me ----> :P



Biggy

admin
Site Admin
Posts: 66249
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Re: Can we rename a tab in a script?

Post by admin »

Biggynuff wrote:I'm sat staring at my XY and this is a picture of me ----> :P
Oh wow, completely forgot that you started this some days ago (seems ages). Great! :D If you find the new command as clumsy as TheQwerty says ( :wink: ) or have some ideas to streamline it, let me know. I hardly have any time for scripting so I have no real idea about its usability... :roll:

Biggynuff
Posts: 110
Joined: 13 May 2010 14:08

Re: Can we rename a tab in a script?

Post by Biggynuff »

Hi Don,

Nope, nothing clumsy over here . . . but please don't take the word of a scripting beginner. I'm sure the experts will soon let you know. Lol :lol:

Thanks very much for the time and the work, it's truly appreciated



Biggy

Stefan
Posts: 1360
Joined: 18 Nov 2008 21:47
Location: Europe

Re: Can we rename a tab in a script?

Post by Stefan »

Is there an trick now?

With v9.30.0012

::tab("rename","Test");

don't rename the tabs description/caption
but add 'Test' to the yellow tool tip only.

The same with 'Rename Tab...' from context menu.

Comparatively Test:
with v9.30.0006 i can rename the caption with the command from ctx menu.

admin
Site Admin
Posts: 66249
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Re: Can we rename a tab in a script?

Post by admin »

Stefan wrote:Is there an trick now?

With v9.30.0012

::tab("rename","Test");

don't rename the tabs description/caption
but add 'Test' to the yellow tool tip only.

The same with 'Rename Tab...' from context menu.

Comparatively Test:
with v9.30.0006 i can rename the caption with the command from ctx menu.
Works fine here. :?

Stefan
Posts: 1360
Joined: 18 Nov 2008 21:47
Location: Europe

Re: Can we rename a tab in a script?

Post by Stefan »

admin wrote:
Stefan wrote: With v9.30.0012
::tab("rename","Test");
don't rename the tabs description/caption
but add 'Test' to the yellow tool tip only.
Works fine here. :?
OK, it works for
"Custom"
or
"Folders only"
in "Tools > Configuration > Tabs >Tabs Captions: [     ]"

but not for "Full Path", what i had set here.


If i have set "Tabs Captions" to "Custom" or "Folders only" i see the renamed caption, but not if i had set it to "Full Path".


---------------------

BTW, i need but can't find an option to read an caption.
<curtab> read the location spec of the current tab
but not the caption if the tab is renamed.

I think i search for tab("get","caption");
and maybe tab("get","location");
and <curcap>


:wink: can we have this too, please ?


---------------------

.

admin
Site Admin
Posts: 66249
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Re: Can we rename a tab in a script?

Post by admin »

1) Oh yes, bug!

2) tab("get","caption");
Yep, I'm working on these things right now, will come today...

Stefan
Posts: 1360
Joined: 18 Nov 2008 21:47
Location: Europe

Re: Can we rename a tab in a script?

Post by Stefan »

admin wrote:1) Oh yes, bug!

2) tab("get","caption");
Yep, I'm working on these things right now, will come today...
Both works fine now with the latest XYplorer BETA version (v9.30.0014, 25-jul-2010), thanks.

TheQwerty
Posts: 4373
Joined: 03 Aug 2007 22:30

Re: Can we rename a tab in a script?

Post by TheQwerty »

From a fresh copy of XY v9.30.0015 run this script:

Code: Select all

::tab('relocate','<xydata>');tab('sethome','<xydata>');#349;goto('<xydata>\Scripts');
The tab icon should have disappeared.

While perhaps not the expected behavior, I did very much appreciate that before porta-tabs (portabs?, PTs?) the icon displayed on the tab was the same as the locked location.

This meant I could have a tab with locked home <xydata> which used a desktop.ini to display XY's icon and it would have the same icon even when I'm playing around in my scripts folders which do not have desktop.ini files.

Can we get the same done for relocated tabs?

admin
Site Admin
Posts: 66249
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Re: Can we rename a tab in a script?

Post by admin »

TheQwerty wrote:From a fresh copy of XY v9.30.0015 run this script:

Code: Select all

::tab('relocate','<xydata>');tab('sethome','<xydata>');#349;goto('<xydata>\Scripts');
The tab icon should have disappeared.

While perhaps not the expected behavior, I did very much appreciate that before porta-tabs (portabs?, PTs?) the icon displayed on the tab was the same as the locked location.

This meant I could have a tab with locked home <xydata> which used a desktop.ini to display XY's icon and it would have the same icon even when I'm playing around in my scripts folders which do not have desktop.ini files.

Can we get the same done for relocated tabs?
Confirmed and fixed. Yes, should work as you desire. :)

Post Reply