Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Popup menu over toolbar
Message
 
 
To
11/06/2004 10:49:31
Héctor Lizarraga
Gobierno Del Edo de Querétaro
Querétaro, Mexico
General information
Forum:
Visual FoxPro
Category:
Menus & Menu designer
Miscellaneous
Thread ID:
00912732
Message ID:
00913112
Views:
33
Hi Héctor,

I don't see this in my test. A shortcut menu popus at the point of right click over toolbar command button. VFP8SP1 and VFP9beta.
PUBLIC oTbr1

oTbr1 = NEWOBJECT("toolbar1")
oTbr1.Show()
oTbr1.dock(0)

DEFINE CLASS toolbar1 AS toolbar

	Caption = "Toolbar1"
	Height = 28
	Left = 0
	Top = 0
	Width = 63
	Name = "mytoolbar"

	ADD OBJECT command1 AS commandbutton WITH ;
		Top = 3, ;
		Left = 5, ;
		Height = 22, ;
		Width = 23, ;
		Caption = "1", ;
		Name = "Command1"


	ADD OBJECT separator1 AS separator WITH ;
		Top = 3, ;
		Left = 35, ;
		Height = 0, ;
		Width = 0, ;
		Name = "Separator1"


	ADD OBJECT command2 AS commandbutton WITH ;
		Top = 3, ;
		Left = 35, ;
		Height = 22, ;
		Width = 23, ;
		Caption = "2", ;
		Name = "Command2"


	PROCEDURE command1.RightClick
		DEFINE POPUP myshortcut shortcut RELATIVE FROM MROW(),MCOL()
		DEFINE BAR 1 OF myshortcut PROMPT "sm1" 
		DEFINE BAR 2 OF myshortcut PROMPT "sm2"
		DEFINE BAR 3 OF myshortcut PROMPT "am3"
		ACTIVATE POPUP myshortcut		
	ENDPROC

	PROCEDURE command2.RightClick
		DEFINE POPUP myshortcut shortcut RELATIVE FROM MROW(),MCOL()
		DEFINE BAR 1 OF myshortcut PROMPT "sm1-2" 
		DEFINE BAR 2 OF myshortcut PROMPT "sm2-2"
		DEFINE BAR 3 OF myshortcut PROMPT "am3-2"
		ACTIVATE POPUP myshortcut		
	ENDPROC

ENDDEFINE
>How can i display a context popup menu over a command button that is inside a toolbar?
>
>When I call the menu from the RightClick event the menu appears in the screen and not over the toolbar.
--sb--
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform