Without appropriate "hit-testing" capabilities, this becomes a guessing game. It would be good if there was someway to pass in an (x,y) and get back an Integer that mapped to a constant that told us what "part" of the control the coordinates were. That way we could do this:

If me.GetControlPart( x, y ) = ListBox.ControlPartHeading Then
   Return True
End If

Right now, we have to just "assume" (and you know what happens when we spell that out) the height of the heading. While this may not be "terrible" it certainly isn't preferred.

- Ryan Dary

Emile Schwarz wrote:


[EMAIL PROTECTED] wrote:

Subject: Re: CMM in List box header
From: Ryan Dary <[EMAIL PROTECTED]>
Date: Sat, 25 Feb 2006 00:03:48 -0800

I don't know what version of RB you're using, but I just placed this code in the MouseDown event of a ListBox:

Beep
Return True

And sure enough, the event fired properly, even over the header. The only "bad" thing about this event is that it fires over the scrollbar too if I remember correctly. It would be great if RB had some way for us to find out the "hit" part of these kinds of controls.

Conclusion: The ListBox in version REALbasic 2006r1 properly fires the MouseDown event, even over the headers.

- Ryan Dary


So, check the x,y (Mouse) values with the ListBox location, etc.

I think (hope) something can be done that way.

HTH,

Emile


PS: It is a long time since I made some tests with the ListBox / Mouse, so sorry to be wrong earlier.

_______________________________________________
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>

_______________________________________________
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>

Reply via email to