1

Topic: xtaskbar 2.3.2 $currentbuttonwidth$ not working?

I'm currently still using litestep .24.8 and having a very hard time using the currentbuttonwidth evar in a bang command.  Can someone please confirm that these evars work? (currentwidth, currentbuttoncount, etc..) If yes, then how did you get them to work?  I've been using the !parseevars bang before calling my custom bang which basically tries to reposition the taskbar as more buttons are added to the taskbar using !xtaskbarmoveby.

2

Re: xtaskbar 2.3.2 $currentbuttonwidth$ not working?

I'm using xtaskbar-2.3.4 with the 0.25 alpha and have my taskbar centered at the top of screen
and when ever a task is added or removed i use these two lines.
xTaskbarOnAdd                             !xTaskbarRepositionBy taskbarname x y width height
xTaskbarOnRemove                         !xTaskbarRepositionBy taskbarname x y width height
these are some of the other settings for the taskbar

x 0c
y 0
width 0
height 30

basically u set the width of taskbar to 0 and when a task is added u put X to ex. -100 and then width that it sets will be the width of the button

there is a better doc for this in doc file for the xTaskbar-2.0 at the bottom under tips&tricks
hope that helps

3

Re: xtaskbar 2.3.2 $currentbuttonwidth$ not working?

1.  Thank you for responding!
2.  Would you mind trying what you have with 2.3.2 and see if it still works?  I can't use 2.3.4 as I am using XP still.  :-/

4

Re: xtaskbar 2.3.2 $currentbuttonwidth$ not working?

for some reason i get errors trying to use the 2.3.2 version,could be that im on the 0.25 alpha, but i don't see why it wouldn't work, as it was possible to do it on the 2.0 version as i found it in the docs for that version

but if it helps here is the whole thing from that doc

Tips'n'Tricks
If you want a autosizing Taskbar, with Taskbuttons that have a exact size (eg. 64x64), do this:
Use xTaskbarAutoSize or:

The Taskbutton Width and Height are automatically calculated, so your xTaskbarWidth must EXACTLY match the following calculation.
((xTaskbarWidth-xTaskbarLeftBorder-xTaskbarRightBorder)-(ButtonCount-1)*xTaskbarButtonxSpacing)/ButtonCount
If the rest of this calculation is 0, then all Taskbuttons have all the exact same size (the result).

Explicit Example:
The Taskbuttons are 64x64, centered at the top if the screen and grow towards each side of the screen. The xSpacing between the buttons is 6.

xTaskbarHideIfEmpty
xTaskbarx 0c
xTaskbary 5
xTaskbarWidth 0
xTaskbarHeight 64
xTaskbarButtonMaxWidth 64 (you don't need this, if the calculation is exact)
xTaskbarButtonMaxHeight 64 (you don't need this, if the calculation is exact)
xTaskbarTrueTransparency true
xTaskbarLeftBorder 3
xTaskbarRightBorder 3
xTaskbarButtonxSpacing 6
xTaskbarIconSize 64
xTaskbarShowText false

xTaskbarOnAdd !xTaskbarRepositionBy -35 0 70 0
xTaskbarOnRemove !xTaskbarRepositionBy 35 0 -70 0
One tricky point is important!
You must add the xSpacing together with the desired ButtonWidth, but the FIRST Button doesn't need this! If you don't care it may bother you later tongue
2 Solutions:
1. Start with a Width of 0 and use LeftBorder and RightBorder so that they are together as big as your xSpacing.
2. Don't use a xSpacing and add/remove only the desired Width (64)

The above calculation in details:
First Button: ((70-3-3)-(1-1)*6)/1 -> 64/1 == 64 rest 0
Second Button: ((140-3-3)-(2-1)*6)/2 -> 128/2 == 64 rest 0
Third Button: ((210-3-3)-(3-1)*6)/3 -> 192/3 == 64 rest 0
...

If you refer to this, you can achieve all you want smile