Systray positionig problem Thread last updated on 2003-02-21 03:47:18

Posted by member 2160 on 2003-02-16 08:23:36

Hello I hawe problem, or not realy problem once I figure out that when I am possitioning systry onto right top corner with auto groving that it X position should be -64 instead off -1 iff I wonted it to be on the edge. Question is this Bug or is there something about positioning that I missed in manual. here is my step.rc for systry

Thanks

SystrayHidden false
SystrayAlwaysOnTop true
SystrayX -64
SystrayY 0
SystrayAutoSize true
SystrayDirection left
SystrayIconSize 16
SystrayBitmap tray.png
SystrayBorderLeft 0
SystrayBorderRight 2
SystrayBorderTop 3
SystrayBorderBottom 3
SystrayIconSpacingX 1
SysTrayOnAdd !Execute [!TaskbarShrink 17 0]
SysTrayOnDel !Execute [!TaskbarGrow 17 0]

Posted by member 5406 on 2003-02-16 10:05:21 link

Well it's certain that you shouldn't have SystrayX -1 og -0 since the coordinates represent the top-left corner position. If you have a static systray it's easy to define what the SystrayX shold be (simply -(SystrayWidth)) but with autoresize it's kinda tricky because the upperleft corner changes position while the systray is growing or shrinking. I guess -64 is somekind of "magic" number. It also worked for me in the y-direction.
Look at me. I've written a long thread without answering your question.

Posted by member 1301 on 2003-02-16 13:49:12 link

to position the systray in the bottom right hand corner you have to set the SystrayX to -SystrayWidth to get it to stay in the corner right. I think this would be because the auto resize works after the systray is positioned so if your width was set to 64 then the SystrayX would be -64. Hope that answers your question. and I never saw this in the manuel as well just fiddled around with systray till I figured out where that magic number to get it right came from

Posted by member 37 on 2003-02-16 21:20:06 link

I believe ziege is correct. Try setting the Y position at whatever the actual width of your systray image is. If it's a 100 pixels wide, use -100 as the Y position.

Posted by member 2160 on 2003-02-17 03:12:27 link

Ok so how can you get this SystrayWidth i tried $SystrayWidth$ but I got unknown wariable result, so is there any dinamyc variable representing current width off systry?

Posted by member 2160 on 2003-02-17 04:16:06 link

One more thing when I user recycle then I definetly have more than 4 iccons in try that means that try width is bigger than 64 and it still works position -64 ??

Posted by member 5406 on 2003-02-17 08:27:25 link

it's not the actual systray image width that is the magic number. 64 seems to be the magic number. I have a systray image which is 7p high (in the bottom left cornor) but I have y set to -64 to get it to stay there. 64's just the magic number...

Posted by member 60 on 2003-02-17 09:23:24 link

the defualt values for SystrayWidth & SystrayHeight are 64, so when you use -64 it is really the same as -$SystrayWidth$ or -$SystrayWidth$ (if you set were to set them).

Posted by member 5246 on 2003-02-18 16:46:38 link

Easy fix: I had the same problem, just add this line your step.rc:

SystrayIconSize 16

When the systray knows the size of the icons, it positions itself correctly. 16 is standard size, but you can change it to how you want.

Posted by member 2160 on 2003-02-19 03:54:56 link

Actualy if you add at step.rc in systray first
SystrayWidth 0
then
SystrayX -0
it is positioned right in right corner so cpm is right 64 is default width, and if you want to use -0 you nead to shorten systray.

Posted by member 2160 on 2003-02-20 03:30:46 link

One more thing it all works if you use !recycle but if you use !refresh then again there is no systry, probably because now it has more icons inside and it it bigger so when you position it -64 it is out of the screen. Any idea?

Posted by member 60 on 2003-02-20 09:15:10 link

indie build after 2002-09-12
(just guessing here)
if SystrayCurrentWidth
SystrayX -$SystrayCurrentWidth$
else
SystrayX -0
endif

Posted by member 2160 on 2003-02-20 15:53:38 link

Hi cpm I tried your gues and it is same. But if I try to put only
SystrayX -$SystrayCurrentWidth$
I got error message Uninitialized Variable: systraycurrentwidth at line -$SystrayCurrentWidth$ ?
Is there something or some initialization that should be done
I have indie build 2002-11-29

Posted by member 35 on 2003-02-20 17:17:05 link

i think it should be $-SystrayCurrentWidth$

Posted by member 2160 on 2003-02-21 03:47:18 link

it is same with $-SystrayCurrentWidth$ or $SystrayCurrentWidth$ always uninitialized Variable, and I also checked systry2.dll with hexeditor and there is SystrayCurrentWidth in it?