Board index » delphi » Executing a popup on button's onClick event

Executing a popup on button's onClick event

I'd like to know how call the popup menu from a button's onClick event. Is
something like this?

procedure form1.mybuttonOnClick(Sender:TObject);
Begin
     myPopup.popup(x,y)
End;

What the positons for x and y in order to the popup appear on side at my
button?

Sorry, my poor english

Eduardo Bitu

 

Re:Executing a popup on button's onClick event


On Fri, 7 May 1999 21:45:23 -0300, "Eduardo Bitu"

Quote
<tunia...@br.homeshopping.com.br> wrote:
>What the positons for x and y in order to the popup appear on side at my
>button?

The popup menu needs screen coordinates. Use the ClientToScreen method
to convert client coordinates to screen coordinates.

---
Yorai Aminov (TeamB)
http://ourworld.compuserve.com/homepages/yaminov
(TeamB cannot answer questions received via email.
To contact me for any other reason remove nospam from my address)

Re:Executing a popup on button's onClick event


You might give our button a try. Just set one property to activate the
Popupmenu.

oxButtons
http://www.opaquesoftware.com/download/delphi4/oxbtns4.exe

or vist our web site
http://www.opaquesoftware.com

Thanks, Brett

Quote
Eduardo Bitu wrote in message <7h018s$fh...@forums.borland.com>...
>I'd like to know how call the popup menu from a button's onClick event. Is
>something like this?

>procedure form1.mybuttonOnClick(Sender:TObject);
>Begin
>     myPopup.popup(x,y)
>End;

>What the positons for x and y in order to the popup appear on side at my
>button?

>Sorry, my poor english

>Eduardo Bitu

Other Threads