-
Notifications
You must be signed in to change notification settings - Fork 48
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
Get bbox coordinates of selected cell #141
Comments
Sorry for the late reply, I am not sure what data you're trying to insert? Do you mean change the text of a cell? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hello, @ragardner! Really wanted to say thank you for create this cool thing like "TKSHEET"! I started to find one of the most usefull table view widget and yours was the best choice for me!
But I can't figure it out how I could get specific coordinates by using "bbox". Could you help me to solve this issue? I just need to know how I can get selected cell and insert this data to bbox -> after get tuple of coordinates
(x1, y1, x2, y2)
.Because for this moment, I can use bbox only with sheet widget. Like
sheet.bbox()
. And of course I need to insert between brackets some kind of information, so this function could give me information, like on which cell I clicked and bring me coordinates of this cell.I tried to do it like this:
But values from print(box) are so strange.
documentation said:
"The returned integers specify the offset of the upper left corner in the master widget and the width and height."
Because, if I clicked on cell (row: 0, column: 0) -> I'm getting
(0, 0, 0, 21)
, but then I clicked on cell (row: 0, column: 1) -> I'm getting(0, 0, 1252, 21)
. Question is: why first and a second values are not changing, and why third value (1252) is so big, I don't even have cell with this width. I think I do something wrong maybe.So, thanks in advance!
The text was updated successfully, but these errors were encountered: