TableListBox cellClicked


#1

Hi Jules, is there some reason why cellClicked is called on mouseDown if the row is not selected, and on mouseUp if it is? I’d optimally need it to be called on mouseUp only…

Edit: The way Windows works with lists is that selection changes on mouseDown, but property pages show on mouseUp.


#2

It’s because it needs to know whether you’re clicking/dragging/etc.

But if you’re even asking the question, then you probably shouldn’t be using cellClicked - it’s not supposed to be a direct reflection of a mouse event, it’s just telling you about a user’s intent - you can’t even rely on it being triggered by a real mouse event. If you need to react to actual mouse events, you should probably be using a mouse listener directly instead.


#3

Convenience as the row/col is given is why I’d like to use it, but also the mouseListener seems to listen to mouse clicks on the header, making the list context menu interfere/mess with the header column popup :frowning:


#4

What exactly are you trying to do?


#5

Popup a context menu. And I really, really need it to be activated on mouse up…


#6

…ok, I won’t ask why you need it on mouse-up! Maybe using a custom cell component might be the best way to do it?