Re: How to simulate a Mouse Click on a row in NSTableView
Re: How to simulate a Mouse Click on a row in NSTableView
- Subject: Re: How to simulate a Mouse Click on a row in NSTableView
- From: Ron Fleckner <email@hidden>
- Date: Fri, 11 Jan 2008 14:32:42 +1100
On 11/01/2008, at 1:19 PM, DongRuchan wrote:
hi,
I have a problem :how to simulate a Mouse Click on a row in
NSTableView
the specific condition is that
there are two tables in a window, we can image it is a phonebook.
in the window, the left table is the groupList, and the right is
the userList.
I use a example to show my question
in the groupList I have several group such as
frends
family
teacher
and so on.
we click frends row,we can get it's members in the userList .
How to simulate "click frends row" ,and the userList table to show
freds's members?
hope to someone to help me!
best regards,
Ruby
Hi Ruby,
I think you won't need to simulate a mouse click. Just select the
row you want in the userList:
NSIndexSet *indexSet = [NSIndexSet
indexSetWithIndex:indexOfYourTargetRow];
[myUserListTableView selectRowIndexes:indexSet
byExtendingSelection:NO];
This will select the row. This will work on OS X 10.3 or later.
Ron
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden