Popup when press a label Thread last updated on 2005-09-07 09:45:02

Posted by member 173795 on 2005-09-06 17:17:40

Hello folks, i have made a few labels thats show how much free space i have on each harddrive. Now i want to be able to press the lable with my left mousebutton and then there should come up a popup (like windows start menu) that shows the content of lets say "D:"

Im not verry skilled with this and have tryed to look at others themes but there codes are way to complicated devided over many config files, So please help me with this simple request.

Posted by member 1885 on 2005-09-06 18:37:33 link

I *could* tell you to RTFM, but since you made such a polite, well formulated request I'll just tell you how to do it :)

First of all, I'm assuming that you're using xLabel for the labels. Secondly, you'll need xPopup for the menus since Popup.dll can't show folder contents in a main popup (IIRC). What you need to do first is define a new menu for each drive. For example:

*popup "Drive D" !new !popupdrived
*popup "D:" "!popupdynamicfolder:D:\"
*popup ~new

... and so on. Finally you'll end up with a bang for each drive, i.e. !popupdrivec, !popupdrived, !popupdrivee etc.

Then you'll have to assign these bangs to the labels, which is really easy. Just add...

labelnameonleftclick !popupdrivec

... where "labelname" is of course the name of the current label. That should be it, but I havent tested this and it's pretty late here so anyone feel free to correct me if I'm wrong about something.

Posted by member 12025 on 2005-09-06 20:23:07 link

Or you could just use something like this:
!popupdynamicfolder "C:\\\"

That, as an action, will work without defining a popup. Making a popup is good for quicklaunch mode popups, and popups with multiple sets of entries.

Posted by member 1885 on 2005-09-06 23:12:27 link

Ah, there you go. I didn't know you could call !popupdynamicfolder directly.

Posted by member 173795 on 2005-09-07 09:45:02 link

Tnx alot both of you, !popupdynamicfolder "C:\" worked just as i wanted it to do.