Is there a way to add a tooltip or tooltip using FireMonkey?

I earned, but did not find anything. Is there a way to add a tooltip or tooltip using FireMonkey? Are any components available that allow this?

Ideally, I'm looking for something like this (callout type tooltip):

a callout type tooltip

To the moderators who put this question on hold: I am looking for lines of source code how to do this, and not software for purchase / use. Currently (AFAIK) there are no source code components that allow this, so there is no risk of "self-confident users or spam."

+6
source share
4 answers

Here's how I did it: create a tooltip for a button that looks like this:

enter image description here

Add a button to the form. Then add TPopup. Drop the CalloutPanel inside it and maybe set the alignment to AlClient. Drop the TLabel on this CalloutPanel and write the hint text.

Your structure should look like this:

enter image description here

Then go to TPopup and set the PlacementTarget to Button1 (your button). Then go to Placement and select BottomCenter:

enter image description here

Then add the MouseEnter and MouseLeave event handler to the button:

procedure TForm1.Button1MouseEnter(Sender: TObject); begin Popup1.IsOpen := True; end; procedure TForm1.Button1MouseLeave(Sender: TObject); begin Popup1.IsOpen := False; end; 

That should do it.

+10
source

this โ€œshould do itโ€ is a very nice workaround, but if the mouse is inside the leader panel it flickers like crazy - any thought on how to avoid it?

I want firemonkey not always to be halfway through the word android has notifications, but not in windows

0
source

I am new to Delphi and FireMonkey. And I also need tool tips. And here's what I found out: FireMonkey has no recommendations for clues, and this is intentional and for a good reason.

I think the big idea with FireMonkey is that you develop one and only one program. Then, without changing a single line of code, you compile the version for working on Windows, another version for Android, another version for Mac OS, etc. Therefore, without changing even one line of code, you have a version for the desktop and a version for smartphones that work exactly the same with the same user interface.

Consequently, FireMonkey will only support features that are inherent in both smartphones and desktops. On smartphones, there is no such thing as a mouse, finger, or anything else freezing. Therefore, Firemonkey does not support freezing on desktop computers. Since there is no freezing, there can be no clues (โ€œcluesโ€ in the Delphi nomenclature).

So, you have to decide: do you want the application to work exactly the same on Windows and on smartphones without changing the code and without a separate code? Or do you want all the features of the desktop? If you want all the features of the desktop, including tooltips (hints) and everything else, you should use the Embarcadero VCL (Visual Component Library). Using VCL will allow you to receive hints (hints) by simply setting the โ€œhintโ€ property of text fields, buttons, and all other controls - and without writing code.

But if you want an application that runs on smartphones, you will have to use FireMonkey. VCL will not work for this.

As I said, I'm still new to Delphi. Therefore, of course, I appreciate the corrections from experienced Delphi developers.

0
source

You can use the FloatAnimation and Opacity property to make a hint.

Add a button to the form. Then add a CalloutPanel (or any shape) inside. Then remove the TLabel in the CalloutPanel to write the hint text. I set the CalloutPanel.Visible property to False at the time the form was created. Then add the TFloatAnimation property to the CalloutPanel.Opacity property.

Then set some TFloatAnimation properties:

Due to the duration of the prompt, it displays smoothly.

Then create Button OnMouseEnter and OnMouseLeave events.

 procedure TForm1.Button1MouseEnter(Sender: TObject); begin CalloutPanel1.Visible := true; end; procedure TForm1.Button1MouseLeave(Sender: TObject); begin CalloutPanel1.Visible := false; end; 

What he

0
source

All Articles