- This topic has 4 replies, 4 voices, and was last updated 5 years, 3 months ago by K.Ob.
-
AuthorPosts
-
July 19, 2019 at 3:40 am #38320JM-DGParticipant
Hi!
I would like to know if it's possible to manually trigger the highlight effect you can see when hovering your mouse over a TMemo.
I'ld like to be able to trigger it when there's a keypress instead.
Thank you for your time.
July 22, 2019 at 8:31 am #59771K.ObParticipant'JM-DG' wrote:Hi!
I would like to know if it's possible to manually trigger the highlight effect you can see when hovering your mouse over a TMemo.
I'ld like to be able to trigger it when there's a keypress instead.
Thank you for your time.
+1
Great idea and i want to add that i would love to see that highlight effect manually triggered for buttons too, ex. with a timer i can point the user to the logical button to press after filling a form (undo,cancel,…) or to point that the content had changed by triggering the effect once for a memo or a listview,
In other words please add a way to trigger the animations effect manually with a demo how to do it right .
Best regards
July 25, 2019 at 3:58 am #59773SzakiLaciParticipantThis topic should be moved to
Technical support >> Tricks
(And delete this reply I've just made here)
July 26, 2019 at 9:00 am #59783SupportKeymasterHello
You can use code like this
Code:procedure TForm9.FormMouseDown(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
begin
ReleaseCapture;
sEdit1.SkinData.FMouseAbove := True;
ShowGlowingIfNeeded(sEdit1.SkinData)
end;procedure TForm9.FormMouseUp(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
begin
HideGlow(sEdit1.SkinData.GlowID);
end;But this way has some limitations and glow effect may be not defined in the current skin.
I will think how to make this feature better, I hope to publish a best solution soon.
July 26, 2019 at 12:50 pm #59786K.ObParticipant'Support' wrote:But this way has some limitations and glow effect may be not defined in the current skin.
I will think how to make this feature better, I hope to publish a best solution soon.
I tried to create sample to explain what i am looking for , so here is it:
What i did is duplicating ShowGlowingIfNeeded to new function
Code:procedure ShowGlowing(const SkinData: TsCommonData; const Clicked: boolean = False; const CtrlHandle: HWND = 0; Alpha: byte = MaxByte; DoAnimation: boolean = True; ASkinIndex: integer = -1); // DoAnimation: boolean = True; was FalseThis procedure code is same as ShowGlowingIfNeeded and called it from timer event like this:
Code:var
i: Integer;
begin
sEdit1.SkinData.FMouseAbove := True;
ShowGlowing(sEdit1.SkinData);i := 0;
while i < 100 do
begin
sleep(1);
application.ProcessMessages;
Inc(i);
end;sEdit1.SkinData.FMouseAbove := False;
ShowGlowing(sEdit1.SkinData);This exactly what i need to do flash control (now it is only highlight and only some skins support it ), but may be this can be a future feature as specific flash visual can be added to skins with different color than highlight.
Anyway, this snippet is wrong and should not be like that, i did this to show the required result which i think many will love to have and use, even may be this can be converted into automatic property to flash controls when changed ( edits, memo's …)
Thank you in advance and please consider to add usable interface to this visual effect.
-
AuthorPosts
- You must be logged in to reply to this topic.