deselecting the table
Dear ragardner,
I have (again) a question about your tksheet. Hopefully, I will be clear enough.
When I double-click on a cell in the table, a cursor starts blinking inside it. Pressing Escape removes the cursor, but the cell remains selected (with bolded borders). I am interested in how to completely deselect the table.
I tried using tksheet.focus_out(), but it didn’t work as I hoped. I also tried the deselect function, but it wasn’t successful either.
Do you have any suggestions on how I can fully deselect the table?
Thank you for your time and help!
Best regards, Janez
Hello,
My apologies, hmm, perhaps something is going wrong, but I think in any case this is not explained well enough in the documentation
Did you try:
sheet.deselect() # no arguments
Kind regards
If you have tried it without arguments already and it doesn't work something must be going wrong and I'll try to figure out what exactly
I will also improve the documentation regardless as I think it's not good enough for this function
Dear ragardner,
first sorry for the mistake in my prevoius mail, the best worked method tksheet.focus.set() at least it removes the blinking cursor from the cell eventhough that the celly stays sellected. deselect.all() does not worked for me. In particular case i used this tk_sheet.select_all(redraw=True, run_binding_func=True) tk_sheet.deselect(row=0, column=0, redraw=True) and it works, however in most recent case i would really like to deselect all the sheet?
P.S. I used tksheet 6.3.5
Best regads, Janez
On Tuesday, December 17th, 2024 at 18:57, ragardner @.***> wrote:
If you have tried it without arguments already and it doesn't work something must be going wrong and I'll try to figure out what exactly
I will also improve the documentation regardless as I think it's not good enough for this function
— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>
Ah sorry, my mistake,
Try this instead:
# close any open text editor without setting cell data
# does nothing if one isn't open
sheet.close_text_editor(set_data=False)
# clears all cell selections
sheet.deselect()
You can then use whichever focus functions you need to after the above, if needed
Kind regards