Board index » delphi » Right mouse click menu??? (beginner question)

Right mouse click menu??? (beginner question)

Hi!

I would like to add functionality to the right mouse button in an
application I wrote.

Well, I managed to bring up a small form on the a right mouse click,
but I want the menu to look just like the menu that appears when you
right click on the start button of win95. I want the background
turning blue on the currrently selected line and I also would like to
show hints for this line in the status bar.

Is there a an easy way to do this? Any tips or tips for components are
appreciated.

Uhh, yes... how should it be done that the form (the small right mouse
click menu form) disappears when you click somewhere _outside_ the
form??? I don't have to go through all onclick events of all my visual
components, have I???? (Well, I said I was a beginner... 8-) )

Thanks for your help,
Marcus

*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~
Marcus Monnig - minib...@cs.tu-berlin.de - PGP Public Key on request

http://www.cs.tu-berlin.de/minibbjd
*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~

 

Re:Right mouse click menu??? (beginner question)


Quote
minib...@cs.tu-berlin.de (Marcus M?nnig) wrote:
>Well, I managed to bring up a small form on the a right mouse click,
>but I want the menu to look just like the menu that appears when you
>right click on the start button of win95. I want the background
>turning blue on the currrently selected line and I also would like to
>show hints for this line in the status bar.

I think you should use the PopupMenu-component.
This component also have Hint.

Add this line to the FormCreate:
 Application.OnHint := ShowHint;

and in the procedure ShowHint:
 Panel1.Caption := Application.Hint;

This is quite basic.
In emergencies mail me, and I try to make an example.

Other Threads