Drop Down list to select ACTIVE button bar

Discuss and announce Total Commander plugins, addons and other useful tools here, both their usage and their development.

Moderators: Hacker, petermad, Stefan2, white

Post Reply
m_pselvam
Junior Member
Junior Member
Posts: 4
Joined: 2009-09-15, 05:25 UTC

Drop Down list to select ACTIVE button bar

Post by *m_pselvam »

[face=courier]
Hi TC Users

I'm Panneer, new to forum. I've been using TC at my work and It is the best.
I always loved to customize TC and one long wish of mine is to customize button bar
with a drop down list of button bars and selected button bar from list become
ACTIVE BUTTON BAR of TC (as if like changing button bar using "Configuration-Button Bar"
menu)

Last week I found a way to achieve my dream and I would like to thanks first

Christian Ghisler (for giving us such a great tool)

and

Samuel Plentz (for giving us "ButtonBar eXtended" to customize button bar)

Let me explain how to do it,

1. Create a drop down list bar file "dropdown.bar" (with empty content for now)

2. Download and install "ButtonBar eXtended" tool on your system
I assume you installed it relative TC path as given below
%COMMANDER_PATH%\BBX

NOTE: Can be downloaded from forum topic id "20274"

3. Create your custom button bar file 1 (let us say "custombb1.bar")
a. Populate with required commands/applications/etc
-------------------------------------------------------------------------
[Buttonbar]
Buttoncount=2

button1=wcmicons.dll,3
cmd1=cm_srcshort

button2=wcmicons.dll,4
cmd2=cm_srclong
-------------------------------------------------------------------------

b. Additional to all your commands, add one more command (that is used to switch button bar)
-------------------------------------------------------------------------
[Buttonbar]
Buttoncount=3

button1=wcmicons.dll,3
cmd1=cm_srcshort

button2=wcmicons.dll,4
cmd2=cm_srclong

button3=wcmicons.dll,14
cmd3=<path to drop down bar file>\dropdown.bar
menu3=DropDownMenu
iconic3=1
-------------------------------------------------------------------------
NOTE: Do not forget to increment "ButtonCount" value by 1

4. Create your custom button bar file 2 (let us say "custombb2.bar") and populate it as said in
steps "3a" (ofcourse with different commands) and "3b"

5. Populate "default.bar" file of TC (which will be in below given path)
%COMMANDER_PATH%\default.bar
a. Additional to all commands, add one more command (that is used to switch button bar)
-------------------------------------------------------------------------
[Buttonbar]
Buttoncount=5

...

button5=wcmicons.dll,14
cmd5=<path to drop down bar file>\dropdown.bar
menu5=DropDownMenu
iconic5=1
-------------------------------------------------------------------------
NOTE: Do not forget to increment "ButtonCount" value by 1
NOTE: Id of newly added button must be same as button count

6. Populate "dropdown.bar" file now as given below
-------------------------------------------------------------------------
[Buttonbar]
Buttoncount=3

button1=wcmicons.dll,14
cmd1=%COMMANDER_PATH%\BBX\ButtonBar eXtended.exe
path1=%COMMANDER_PATH%\BBX
menu1=Default
param1=-c "%%COMMANDER_PATH%%\default.bar"
iconic=0

button2=wcmicons.dll,14
cmd2=%COMMANDER_PATH%\BBX\ButtonBar eXtended.exe
path2=%COMMANDER_PATH%\BBX
menu2=Custom BB1
param2=-c "<path to custom button bar file 1>\custombb1.bar"

button3=wcmicons.dll,14
cmd3=%COMMANDER_PATH%\BBX\ButtonBar eXtended.exe
path3=%COMMANDER_PATH%\BBX
menu3=Custom BB2
param3=-c "<path to custom button bar file 2>\custombb2.bar"
-------------------------------------------------------------------------

7. Simply drag and drop the "dropdown.bar" file into button bar of TC
a. Right click on the newly create button (for "dropdown.bar" file)
b. Click "Change..." menu
b. Enable the check box "Show as menu" (which exist below "Change" button on right of dialog window)

!!! :-) :-) :-) You've it now !!!

Just click on newly added "dropdown.bar" button, it drop downs a list of button bars (it will display
"Custom BB1" and "Custom BB2" in above case). Clicking on any one them will make that button bar as
ACTIVE button bar of TC

Hope this helps you all, have fun :-)

[/face]
Panneer

Take only as much as you need - Green World Thumb Rule
User avatar
ZoSTeR
Power Member
Power Member
Posts: 1050
Joined: 2004-07-29, 11:00 UTC

Post by *ZoSTeR »

You don't really need ButtonBar eXtended for this. Just put a .bar file in "cmd" with "iconic=0" and you're done.
m_pselvam
Junior Member
Junior Member
Posts: 4
Joined: 2009-09-15, 05:25 UTC

You're right

Post by *m_pselvam »

Yes, setting "iconic=0" does it (I don't know about this, I thought "ButtonBar Extended" does that magic)

Thanks for your tip! Have a nice day
Panneer

Take only as much as you need - Green World Thumb Rule
m_pselvam
Junior Member
Junior Member
Posts: 4
Joined: 2009-09-15, 05:25 UTC

Modified step (without Button Bar Extended Tool)

Post by *m_pselvam »

[face=courier]Hi All,

Based on ZoSTeR's tip (Thank you ZoSTeR), we can achieve the goal without "Button Bar Extended" tool. In order to do so,
re-do Step 6 alone (on above steps) as given below

Modified 6. Populate "dropdown.bar" file now as given below
-------------------------------------------------------------------------
[Buttonbar]
Buttoncount=3

button1=wcmicons.dll,14
cmd1=%COMMANDER_PATH%\default.bar
path1=
menu1=Default
param1=
iconic1=0

button2=wcmicons.dll,14
cmd2=<path to custom button bar file 1>\custombb1.bar
path2=
menu2=Custom BB1
param2=
iconic2=0

button3=wcmicons.dll,14
cmd3=<path to custom button bar file 2>\custombb2.bar
path3=
menu3=Custom BB2
param3=
iconic3=0
-------------------------------------------------------------------------

That's it!

Have fun ... :-)[/face]
Panneer

Take only as much as you need - Green World Thumb Rule
User avatar
Samuel
Power Member
Power Member
Posts: 1930
Joined: 2003-08-29, 15:44 UTC
Location: Germany, Brandenburg an der Havel
Contact:

Post by *Samuel »

The real benefit of ButtonBar eXtended is its ability to handle Macros and compress several actions to one button. (they are activated by modifier keys or different mouse keys then.)

I dont need 2 or more ButtonBars, because all functionality is compressed in one ButtonBar.
m_pselvam
Junior Member
Junior Member
Posts: 4
Joined: 2009-09-15, 05:25 UTC

Thanks Samuel, It is my misunderstanding about BBX

Post by *m_pselvam »

[face=courier]Hi Samuel,

Thanks for your info, that clears my misunderstanding about BBX.

Wish you a nice day :-)
[/face]
Panneer

Take only as much as you need - Green World Thumb Rule
Post Reply