I need the MouseUp event of a PopupMenu.
To fire this event, you need to Return True in the MouseDown event.
But when you Return True in the MouseDown event, the menu cannot be shown !! Rendering the PopupMenu useless when you need the MouseUp event.
I don’t consider this a bug at all. Return True means that you have handled the event yourself. So if you Return True, then it’s up to you to display the popupMenu menu. What would you have Xojo do? If they changed the behavior of Return True, then that wo uldmake the language very inconsistent. As Kem suggested, what are you trying to get at?
[quote=90958:@Christoph De Vocht]As always Jim, you are awesome.
I am going to call you Jim-The Declareman-McKay
Seriously, you are the first giving so much useful declare stuff for us OSX devs ! Thank you for this, really appreciated.[/quote]
Jim is indeed extremely brilliant using an MBS plugin or a declare. Nevertheless Christoph, even if my pure Xojo solution does not have the same glitz, I was the first to post a working solution built and tested for you. It feels terrible to be ignored entirely. Ouch !
I expect you’ll get more people willing to help in the future if you acknowledge those who tried to help you in the present. Nobody is obligated here, and a “thank you” goes a long way.
OT: There is always a good reason for what we are doing. For instance the good reason for posting answers into this forum may be that we simply like it when we see that we can help and support others. And then of course everybody likes it as well to see that ones efforts are appreciated.
Now one can say that life is teaching us to better not to have expectations for a return of investment… well, still it is true that we enjoy it, when we get what we like to see in our life. Like appreciation.
So I hope that on the next occasion I will remember my own words and express my appreciation for all of you, who make this platform so valuable. Through your work I am learning every day - and this is one of the things I really like.
I do like to help, but I am really driven by “Hmm… interesting question. I wonder if this would work…”
On that note…
If anyone needs a win32 solution, placed in the mouseUp event, this works and you still get the “Change” event
[code] #if TargetWin32 then
const CB_SHOWDROPDOWN = &H14F
Soft Declare Function SendMessageW Lib "user32" Alias "SendMessageW" ( hwnd As int32, wMsg As int32, ByVal wParam As uint32, lParam As uint32) As int32
dim ok as integer=sendmessageW(me.Handle,CB_SHOWDROPDOWN,1,0)
#endif
[/code]
Also, I did like Michel Bujardet’s answer, but I always like to see if the OS can do the work for me.
Again, I am grateful with your solution (Liked it too btw). But still not sure why you were moaning because I thanked Jim for his (better) solution.
So if you still not get it: THANK YOU FOR YOUR INPUT AND SOLUTION. Ohboy …
[quote=91064:@Christoph De Vocht]Again, I am grateful with your solution (Liked it too btw). But still not sure why you were moaning because I thanked Jim for his (better) solution.
So if you still not get it: THANK YOU FOR YOUR INPUT AND SOLUTION. Ohboy …
Lets move on…[/quote]
You are welcome. Still, why do you insist on making me feel like I insulted you ?