Hi mates, (it's my first post here, and I'm not good at speaking english so be kind ^^')
I wanted to use this useful plugin but was confront to this problem : one child trigger the OnDropAction of the others
?
So I quickly came up with a dirty but working trick eheh.
The Trick is to use the OnOverAction/OnLeaveAction to overwrite the OnDropAction on childs :
I leave the OnDropAction empty : This way it will not perform any action.
I use OnOverAction to perform a !SetOption on OnDropAction : This will "enable" the child measure when your cursor is over the "bounds"
I use OnLeaveAction to perform a !SetOption on OnDropAction : This will "disable" the child measure when the cursor leave the "bounds"
But because both the OnOverAction/OnLeaveAction are triggered only if you drag an item, you have to add the bang to "disable" the child measure in the OnOverAction.
TEMPLATE (Replace UpperCase string with your own data)
[CHILDMEASURE]
Measure=Plugin
Plugin=Drag&Drop
Parent=DragNDropParent
Bounds="PARENTMEASURE"
Action="ACTION"
OnOverAction=[!SetOption CHILDMEASURE OnDropAction """[BANGACTION][!SetOption CHILDMEASURE OnDropAction ""][!Update]"""][!Update]
OnLeaveAction=[!SetOption CHILDMEASURE OnDropAction ""]
OnDropAction=
WARNING : Don't forget to use the magic quote """ for the !SetOption on the OnOverAction.
I modified the first example of the documentation to show you how it works :
Code: Select all
[Rainmeter]
Update=-1
AccurateText=1
DynamicWindowSize=1
[DragNDropParent]
Measure=Plugin
Plugin=Drag&Drop
[DragNDropChild1]
Measure=Plugin
Plugin=Drag&Drop
Parent=DragNDropParent
Bounds=DropMeter1
Action=Path
OnOverAction=[!SetOption DragNDropChild1 OnDropAction """[!Log "You dropped a file in the first child!"][!SetOption DragNDropChild1 OnDropAction ""][!Update]"""][!Update]
OnLeaveAction=[!SetOption DragNDropChild1 OnDropAction ""][!Update]
OnDropAction=
[DragNDropChild2]
Measure=Plugin
Plugin=Drag&Drop
Parent=DragNDropParent
Bounds=DropMeter2
Action=Path
OnOverAction=[!SetOption DragNDropChild2 OnDropAction """[!Log "You dropped a file in the second child!"][!SetOption DragNDropChild2 OnDropAction ""][!Update]"""][!Update]
OnLeaveAction=[!SetOption DragNDropChild2 OnDropAction ""][!Update]
OnDropAction=
[DropMeter1]
Meter=Image
W=100
H=200
SolidColor=255,255,255
[DropMeter2]
Meter=Image
X=200
W=100
H=200
SolidColor=255,255,255
Hope this little trick will be as useful for you as it was for me
Still waiting for a overhaul
By Creation Room