RB06R1 Win2K
Drag a listbox onto a window and set it to have a header and toss some data in.
In the Listbox Mousedown Event put:
Function MouseDown(x As Integer, y As Integer) As Boolean
If IsContextualClick and Y < 20 then
Return True
End if
End Function
in the ConstructContextual menu event put:
Function ConstructContextualMenu(base as MenuItem, x as Integer, y as Integer)
As Boolean
Dim Test as New MenuItem
Test.Text = "test"
Base.Append Test
Return True
End Function
Run it in the IDE and right click on the listbox header. I get a contextual
menu even though true is returned in MouseDown. Should I? I thought returning
true in mousedown shoudl stop all other processing.
Anyway I figured that perhaps ConstructContextualMenu got called before
MouseDown
So I put breaks on "Return True" in the MouseDown Event
and on "Dim Test as New MenuItem" in the ConstructContexualMenu Event an ran it
in the IDE and right clicked on the header.
It broke at MouseDown as expected. I hit resume and the ContextualMenu did not
show up ...
Next I took out the break in MouseDown and left the other one in the Construct
event... AND It broke in that event and when i hit resume teh contexyual menu
appeared!
What that says to me is that likely the ConstructContextualMenu Event is ALWAYS
called after MouseDown even if you Return True, AND that the sate of the right
mouse button is checked at the time the Constrct event is called and NOT at
MouseDown ...
Both of which I woudl consider bugs (though the latter is likely only to strike
in the IDE using breaks)
So are these features or bugs, and what can I depend on X-Platform (I've not
tried this on my Mac)
Thanks,
- Karen
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>