It is currently May 7th, 2024, 4:57 pm

Dropdown menu from text

Get help with creating, editing & fixing problems with skins
wayte
Posts: 11
Joined: November 22nd, 2009, 9:35 pm

Dropdown menu from text

Post by wayte »

(Apologies if this is in the wrong section.)

Trying to create a dropdown menu but I'm quite new to rainmeter and don't think I fully understand the basics (especially the order in which things should be put in).

I've googled this a few times, and searched the forums and haven't been able to get it to work from any of the older thread's suggestions.

So far I have this, which was displaying the "Media" text fine, until I removed the [Labels] by accident, and now it wont display at all. The dropdown text never showed up.

Code: Select all

[Labels]
Meter=String
Text=Media

LeftMouseDownAction=!execute ["F:\Media"]

Hidden=0

FontFace=Arial
FontSize=9
FontColor=0,0,0,250
StringStyle=Normal
StringAlign=Left
AntiAlias=1

X=0
Y=0



;--------Dropdown--------------------------

[Rainmeter]
MouseOverAction=!Execute [!RainmeterShowMeter Three][!RainmeterShowMeter Two][!RainmeterShowMeter One]
MouseLeaveAction=!Execute [!RainmeterHideMeter Three][!RainmeterHideMeter Two][!RainmeterHideMeter One]


[MeterThree]
Meter=String
Text=DROPDOWN THREE
FontFace=Arial
FontSize=9
FontColor=0,0,0,250
StringStyle=Normal
StringAlign=Left
AntiAlias=1
x=0
y=-60
ButtonCommand=!execute ["Link"]
Group=Drop1
Hidden=1

[MeterTwo]
Meter=String
Text=DROPDOWN TWO
FontFace=Arial
FontSize=9
FontColor=0,0,0,250
StringStyle=Normal
StringAlign=Left
AntiAlias=1
x=0
y=-30
ButtonCommand=!execute ["Link"]
Group=Drop1
Hidden=1

[MeterOne]
Meter=String
Text=DROPDOWN ONE
FontFace=Arial
FontSize=9
FontColor=0,0,0,250
StringStyle=Normal
StringAlign=Left
AntiAlias=1
x=0
y=-90
ButtonCommand=!execute ["Link"]
Group=Drop1
Hidden=1

Pretty sure this is totally wrong, how to fix it? (If you could explain briefly what was wrong as well that'd be a great help too, thanks.)
User avatar
JpsCrazy
Posts: 667
Joined: April 18th, 2010, 2:16 pm
Location: NY, USA

Re: Dropdown menu from text

Post by JpsCrazy »

First off, make sure [Rainmeter] section is first.

Secondly, one way to do this would be to have a MouseOverAction/MouseLeaveAction with !RainmeterShowMeter ""/!RainmeterHideMeter ""

Here's your code, a bit edited:

Code: Select all

[Rainmeter]
Update=750
DynamicWindowSize=1

[Labels]
Meter=String
Text=Media
SolidColor=00000001
LeftMouseUpAction=!Execute ["F:\Media"]
MouseOverAction=!Execute [!RainmeterShowMeter MeterOne][!RainmeterShowMeter MeterTwo][!RainmeterShowMeter MeterThree]
MouseLeaveAction=!Execute [!RainmeterHideMeter MeterOne][!RainmeterHideMeter MeterTwo][!RainmeterHideMeter MeterThree]
FontFace=Arial
FontSize=9
AntiAlias=1

[MeterOne]
Meter=String
Text=DROPDOWN ONE
FontFace=Arial
FontSize=9
AntiAlias=1
y=90
ButtonCommand=!execute ["Link"]
Hidden=1

[MeterTwo]
Meter=String
Text=DROPDOWN TWO
FontFace=Arial
FontSize=9
AntiAlias=1
y=30
ButtonCommand=!execute ["Link"]
Hidden=1

[MeterThree]
Meter=String
Text=DROPDOWN THREE
FontFace=Arial
FontSize=9
AntiAlias=1
y=60
ButtonCommand=!Execute ["Link"]
Hidden=1
You could alternatively use groups as you tried and do !RainmeterShowGroup ""/!RainmeterHideGroup ""
wayte
Posts: 11
Joined: November 22nd, 2009, 9:35 pm

Re: Dropdown menu from text

Post by wayte »

Ah great! Thanks.

I've put that code in and the three options appear, but if I move the mouse away from the "Media" label they fade, meaning I can't click on them. How do I make it so they will remain as long as my mouse is over any of them?

Is it possible to show/hide a background image (or block of colour) in the same way?


Figured it out!

Code: Select all

[Rainmeter]
Update=100
DynamicWindowSize=1

MouseOverAction=!Execute [!RainmeterShowMeter MeterOne][!RainmeterShowMeter MeterTwo][!RainmeterShowMeter MeterThree][!RainmeterShowMeter MeterBackground]
MouseLeaveAction=!Execute [!RainmeterHideMeter MeterOne][!RainmeterHideMeter MeterTwo][!RainmeterHideMeter MeterThree][!RainmeterHideMeter MeterBackground]



[Labels]
Meter=String
Text=Media
SolidColor=00000001
LeftMouseUpAction=!Execute ["F:\Media"]



FontFace=Arial
FontSize=9
AntiAlias=1

[MeterOne]
Meter=String
Text=DROPDOWN ONE
FontFace=Arial
FontSize=9
AntiAlias=1
y=30
LeftMouseUpAction=!Execute ["F:\Media"]
Hidden=1


[MeterTwo]
Meter=String
Text=DROPDOWN TWO
FontFace=Arial
FontSize=9
AntiAlias=1
y=60
LeftMouseUpAction=!Execute ["F:\Media"]
Hidden=1

[MeterThree]
Meter=String
Text=DROPDOWN THREE
FontFace=Arial
FontSize=9
AntiAlias=1
y=90
LeftMouseUpAction=!Execute ["F:\Media"]
Hidden=1

[MeterBackground]
Meter=String
BackgroundMode=2
SolidColor=0,0,0,50
H=220
W=130
Y=25