Re: Intercepting Click in Background of Table View
Re: Intercepting Click in Background of Table View
- Subject: Re: Intercepting Click in Background of Table View
- From: Scott Anguish <email@hidden>
- Date: Fri, 8 Jul 2005 03:21:19 -0400
On Jul 8, 2005, at 2:13 AM, Seth Willits wrote:
Is there a way to determine whether the user clicked on the
background of a table view? I have an application where when the
header of a column is selected, two buttons change to be context-
sensitive (from row to column depending on which is selected - four
buttons is just way too cluttered). The problem is, if there are
now rows in the table, the only way to deselect the column is to
command click the header which isn't very obvious at all.
So what I want to do is know when the user clicked on the
background of the table view (in the blank content area) so I can
then deselect the column (just like how it works if a row is
selected). I can clearly intercept mouseDown by overriding it in a
subclass, but that's too low level, but there's nothing higher than
that I can see that would help me.
try this... in your target action method call clickedRow that'll
return -1 if there is no row...
This isn't stated in the current doc, but is for the next update.
Returns the index of the row the user clicked to trigger an action
message, or -1 if no row exists. The return value of this method is
meaningful only in the target’s implementation of the action or
double-action method.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden