Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NSMatrix selected item #3

Open
Slavetz opened this issue Jan 18, 2017 · 2 comments
Open

NSMatrix selected item #3

Slavetz opened this issue Jan 18, 2017 · 2 comments

Comments

@Slavetz
Copy link

Slavetz commented Jan 18, 2017

your examples very awesome
how can i get NSMatrix selected item... Item.tag or item.index for example

@tylergaw
Copy link
Owner

Hey @Slavetz. I'm looking at the NSMatrix docs https://developer.apple.com/reference/appkit/nsmatrix?language=objc but I'm not sure how to get the selected item. Would have to dig in further. It's been a while since I worked with these examples.

@Slavetz
Copy link
Author

Slavetz commented Jan 31, 2017

its work as:

console.log(matrix1.selectedCell.title.js);
console.log(matrix1.selectedCell.tag);

And one moment... if you need select other cell as default (not first) you need to use selectCell method, selection of different state for cells is not enough

matrix1.selectCellAtRowColumn(row, column)
matrix1.selectCellWithTag(tag)

tag, row, column must has int value

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants