Login
`
Templates, Tools and Utilities
|
||
Add a comment to an Icetips ArticlePlease add your comments to this article.
Please note that you must provide both a name and a valid email address in order
for us to publish your comment. Comments are moderated and are not visible until they have been approved. Spam is never approved!
Back to article list Search Articles Add Comment Printer friendly Direct link ABC: Declaring popup menus using abc classes 1998-11-11 -- Jim Katz Newsgroups: topspeed.products.c5ee
> I need to create a pop-up menu when the user right-clicks over a text
> box on a form. Are there any good examples available of how to do this?
> I have been looking at the examples APP's that come with C5 but haven't
> seen one yet.
I would do this using the ABC popup Class. In your local data declare an
object of the popup class:
MyPopup &PopupClass
Then in the Window Manager's Init Method
MyPopup &= New PopupClass
MyPopup.Init()
Then add the items to the popup to do whatever you need the popup to do.
MyPopup.AddItem('Do Something',DoSomething)
or
MyPopup.AddItemEvent('Do This',Event:MyEvent,)
In the Window Manager's TakeKey method:
If Keycode() = MouseRight
IF Field() = ?MyTextField
MyPopup.Ask()
End
End
Then in the Window Manager's Kill method:
MyPopup.Kill
For more info on the various methods see the Application Handbook.
HTH
--
Jim Katz
Today is November 23, 2024, 3:35 am This article has been viewed 35397 times. Google search has resulted in 9 hits on this article since January 25, 2004.
|
|