It is currently March 28th, 2024, 11:39 am

String meter option to make the whole "text area" draggable?

Get help with installing and using Rainmeter.
Post Reply
llinfeng
Posts: 5
Joined: May 4th, 2022, 9:08 pm

String meter option to make the whole "text area" draggable?

Post by llinfeng »

For string meters, is there an option to make the whole meter draggable? For now, I'll need to carefully place the mouse cursor on the text, and then drag. Ideally, I'd like to drag the string meter by holding the mouse on the "text area", defined by the rectangular area spanned by the text.

Here is a skin configured to show the name of the current virtual deesktop and the CPU temperature. [Dependency: the VirtualDesktop plugin.]

Code: Select all

[Rainmeter]
Update=10000
AccurateText=1

[MeasureVirtualDesktop]
Measure=Plugin
Plugin=VirtualDesktop
UpdateDivider=-1
OnUpdateAction=[!UpdateMeter MeterDesktopName][!Redraw]

[MeterDesktopName]
Meter=String
MeasureName=MeasureVirtualDesktop
Text=%1
FontColor=FFCB05
FontFace=Tahoma
FontSize=24
AntiAlias=1
X=26

[MeasureMaxTemp]
Measure=Plugin
Plugin=CoreTemp
CoreTempType=MaxTemperature

[MeterMaxTemp]
Meter=String
MeasureName=MeasureMaxTemp
X=0
Y=0
W=30
Text="%1"
FontColor=00275C
FontFace=Tahoma
FontFace=ProFontWindows
FontSize=14
AntiAlias=1
StringEffect=BORDER
FontEffectColor=#ffffff
It looks like the following:
Image
User avatar
SilverAzide
Rainmeter Sage
Posts: 2588
Joined: March 23rd, 2015, 5:26 pm
Contact:

Re: String meter option to make the whole "text area" draggable?

Post by SilverAzide »

llinfeng wrote: January 27th, 2023, 2:45 pm For string meters, is there an option to make the whole meter draggable? For now, I'll need to carefully place the mouse cursor on the text, and then drag. Ideally, I'd like to drag the string meter by holding the mouse on the "text area", defined by the rectangular area spanned by the text.
Sure, that's easily done. In Rainmeter, the mouse actions will react to any area that is non-transparent. So all you need to do is change the background of any meter to a non-transparent value. Simply add the following line:

Code: Select all

SolidColor=0,0,0,1
This works for all types of meters (String, Image, etc.). This is described in the manual, under SolidColor.
llinfeng
Posts: 5
Joined: May 4th, 2022, 9:08 pm

Re: String meter option to make the whole "text area" draggable?

Post by llinfeng »

Many thanks! I was searching for keyword "draggable", or "drag". The manual entry is accurate. To be able to drag something, the item/meter needs to be clickable first.
Post Reply