Comments (6)
Ah, I think this is the behavior I programmed for,
Would you prefer the next dropdown box to open when pressing tab out of an existing one? I am not sure, it's not the behavior in excel and google sheets as far as I can tell, although it might be more convenient to have it this way...
You could open it by using Tab -> Return I think
from tksheet.
Hi,
The Second issue i came across was the double_clicking on a cell which has an overflowing number of characters. When i double click, the column gets resized. I have tried to disable the following bindings 'double_click_column_resize' and 'column_width_resize' but nothing changes. I still have the same issue.
You can disable cell auto resizing when editing cells completely with the argument enable_edit_cell_auto_resize = False
in the Sheet()
initialization
my_sheet = Sheet(parent, enable_edit_cell_auto_resize = False)
or with set_options(enable_edit_cell_auto_resize = False)
The specific part of the code that deals with resizing the cell upon opening is:
text = "" if text is None else text
if self.cell_auto_resize_enabled:
self.set_cell_size_to_text(r, c, only_set_if_too_small=True, redraw=True, run_binding=True)
It's in the open_text_editor()
function
I also would like to have an autofill feature for the drop down list. This way when I write 'OF' on an ['ON','OFF'] drop down list and then press < Tab > the 'OFF' gets selected.
I won't be working on this functionality for some time, I am not sure of the best way to implement it sorry but there would have to be communication between the dropdown window and the text editor, these two are in the open_dropdown()
function
When i press < Tab > or < Enter > on an editable sheet, I can't edit the cell without an additional click to reselect the ongoing cell. I have tried to go through the tab_key(self, event=None) function of the MainTable class, replacing self.see by self.select_cell but it doesn't work.
Sorry, I'm not sure what you mean, is focus not being applied to the text editor when you press Enter on a cell?
from tksheet.
Thank you for your response. Focus is being applied but I can't write text on the cell without reclicking on the focused cell.
from tksheet.
I cannot think why this is happening sorry, is there any way you could provide a minimal example and which version of tksheet you're using?
from tksheet.
I have the issue with this piece of code, my version is 6.1.2.
from tksheet import Sheet
import tkinter as tk
class demo(tk.Tk):
def __init__(self):
tk.Tk.__init__(self)
self.grid_columnconfigure(0, weight = 1)
self.grid_rowconfigure(0, weight = 1)
self.frame = tk.Frame(self)
self.frame.grid_columnconfigure(0, weight = 1)
self.frame.grid_rowconfigure(0, weight = 1)
self.sheet = Sheet(self.frame,
data = [[f"Row {r}, Column {c}\nnewline1\nnewline2" for c in range(50)] for r in range(500)])
self.sheet.enable_bindings()
self.show_selections = tk.Label(self)
self.frame.grid(row = 0, column = 0, sticky = "nswe")
self.sheet.grid(row = 0, column = 0, sticky = "nswe")
self.show_selections.grid(row = 1, column = 0, sticky = "nswe")
self.sheet.dropdown_column(c=1, values=["ON", "OFF"])
app = demo()
app.mainloop()
I upgraded to the latest version which is "6.1.9" and the problem has been solved. I work with PyCharm hence the fact that i didn't have installed the latest version to start with.
Thank you !
from tksheet.
from tksheet import Sheet
import tkinter as tk
class demo(tk.Tk):
def __init__(self):
tk.Tk.__init__(self)
self.grid_columnconfigure(0, weight = 1)
self.grid_rowconfigure(0, weight = 1)
self.frame = tk.Frame(self)
self.frame.grid_columnconfigure(0, weight = 1)
self.frame.grid_rowconfigure(0, weight = 1)
self.sheet = Sheet(self.frame,
data = [[f"Row {r}, Column {c}\nnewline1\nnewline2" for c in range(50)] for r in range(500)])
self.sheet.enable_bindings()
self.show_selections = tk.Label(self)
self.frame.grid(row = 0, column = 0, sticky = "nswe")
self.sheet.grid(row = 0, column = 0, sticky = "nswe")
self.show_selections.grid(row = 1, column = 0, sticky = "nswe")
self.sheet.dropdown_column(c=1, values=["ON", "OFF"])
self.sheet.dropdown_column(c=2, values=["ON", "OFF"])
self.sheet.dropdown_column(c=3, values=["ON", "OFF"])
app = demo()
app.mainloop()
but with this example the problem seems to persist with the drop down columns. The dropdown list doesn't drop after pressing TAB and arriving on it.
from tksheet.
Related Issues (20)
- Column header data not made when creating new columns HOT 2
- KeyError when binding a function (which selects a row) to "cell_select" HOT 8
- Resizing columns automatically to fit the frame if they would be smaller in total than the available space HOT 6
- Can we add a feature where Checkbox fill the entire cell ?
- Deleting popup_menu. HOT 3
- Moving columns/rows to the end is currently broken on 7.2.6
- How to make the Checkbox remain checked after searching in Entry HOT 1
- Copy&Paste HOT 2
- Sheet object takes focus when setting sheet data? How to inhibit? HOT 6
- Dropdown multi-select checkbox filter HOT 1
- function "checkbox" in "other_classes.py" currently creates a dropdown instead of a checkbox HOT 1
- REQUEST : Add a sort function
- IndexError: list index out of range
- Deleting Row(s): TypeError: cannot pickle '_tkinter.tkapp' object HOT 3
- Issue on Selected rows when Displaying Rows HOT 5
- ScrollBar BackGround HOT 3
- Change 'Return' key behavior after end_edit_cell
- Problem with right click popup menu inside the cell HOT 3
- 'end_edit_cell' with 'Return' key as 'Tab' key HOT 2
- using the "Supr"/"Del" key in the same way as the "Backspace" key HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from tksheet.