I added instructions to the online book... http://book.pharo-project.org/book/LanguageAndLibraries/GUI/contextmenus Sean -- View this message in context: http://forum.world.st/Adding-a-context-menu-to-a-Morph-tp3991117p3991117.htm... Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.
Sean P. DeNigris wrote:
I added instructions to the online book... http://book.pharo-project.org/book/LanguageAndLibraries/GUI/contextmenus
I tried your instructions in Pharo 1.3 with a direct Subclass of Morph and noticed some differences to your description (which may very well be due to my lack of understanding..): 1) the examples work as well, if you do not add: handlesMouseDown: anEvent ^ true. if I did add handleMouseDown, my Morph did loose all other standard mouse actions, like beeing dragable. 2) defaultYellowButtonMenuEnabled ^ true. had to be included also if you did not want the default menu + some #addCustomMenuItems: aCustomMenu hand: aHandMorph _but also_ if you wanted a complete custom menu with #addYellowButtonMenuItemsTo: aMenu event: evt Perhaps you have some more information on this? BTW, thank you very much for the book entry, itâs much appreciated. I am a regular reader of the collaboractive book :) Best regards, Helene. -- View this message in context: http://forum.world.st/Adding-a-context-menu-to-a-Morph-tp3991117p4031217.htm... Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.
Helene Bilbo wrote:
I tried your instructions in Pharo 1.3 with a direct Subclass of Morph and noticed some differences to your description (which may very well be due to my lack of understanding..):
Hmm... I was working on an ImageMorph subclass at the time. Maybe that causes the difference. I'll take a deeper look when time permits. Helene Bilbo wrote:
if I did add handleMouseDown, my Morph did loose all other standard mouse actions, like beeing dragable.
This is normal. When you take over mouse handling, you lose the standard "pick up morph" behavior. Glad you got some use out of it! Sean -- View this message in context: http://forum.world.st/Adding-a-context-menu-to-a-Morph-tp3991117p4031756.htm... Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.
participants (2)
-
Helene Bilbo -
Sean P. DeNigris