FROM : Ron Fleckner
DATE : Fri Jan 11 04:32:42 2008
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
DATE : Fri Jan 11 04:32:42 2008
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
| Related mails | Author | Date |
|---|---|---|
| DongRuchan | Jan 11, 03:19 | |
| Ron Fleckner | Jan 11, 04:32 | |
| Andrew Farmer | Jan 11, 04:39 |






Cocoa mail archive

