Comments (2)
Thanks for your question and sorry for the late reply,
I think I have found a way to do this, the test code I have been using sits inside sheet.py
__init__
function:
style = ttk.Style()
for orientation in ("Vertical", "Horizontal"):
style.element_create(f"Tksheet.{orientation}.TScrollbar.trough", "from", "default")
style.element_create(f"Tksheet.{orientation}.TScrollbar.thumb", "from", "default")
style.element_create(f"Tksheet.{orientation}.TScrollbar.grip", "from", "default")
# in case you want to remove the arrow buttons uncomment below:
# style.layout(
# f"Tksheet.{orientation}.TScrollbar",
# [
# (
# f"Tksheet.{orientation}.TScrollbar.trough",
# {
# "children": [
# (
# f"Tksheet.{orientation}.TScrollbar.thumb",
# {
# "unit": "1",
# "children": [(f"Tksheet.{orientation}.TScrollbar.grip", {"sticky": ""})],
# "sticky": "nswe",
# },
# )
# ],
# "sticky": "ns" if orientation == "Vertical" else "ew",
# },
# )
# ],
# )
style.configure(
f"Tksheet.{orientation}.TScrollbar",
gripcount=0,
borderwidth=2,
background="#b0b0b0",
troughcolor="red",
bordercolor="#252526",
lightcolor="#252526",
darkcolor="#252526",
)
Those colours are just to test it out
I will hopefully be adding the Sheet initialization and set_options()
parameters for scrollbar colours in the next update
Edit: I forgot to mention you also have to set the style parameter for the scrollbars if using the above code
self.yscroll = ttk.Scrollbar(
self,
command=self.MT.set_yviews,
orient="vertical",
style="Tksheet.Vertical.TScrollbar",
)
self.xscroll = ttk.Scrollbar(
self,
command=self.MT.set_xviews,
orient="horizontal",
style="Tksheet.Horizontal.TScrollbar",
)
Edit 2: You also have to use the style.map()
function it seems, something like shown in this stackoverflow answer
Edit 3: This seems to clash with the dropdown boxes scrollbars and cause an error
from tksheet.
@infiniteTesch I have now added the ability to change scroll bar appearance in version 7.1.0
documentation here:
https://github.com/ragardner/tksheet/wiki/Version-7#scrollbar-appearance
Thanks again for your suggestion!
from tksheet.
Related Issues (20)
- Keypad enter button ignored HOT 2
- Quotes multiplies when i copy text from cell with ctrl+c or popup menu. HOT 2
- Editing out of bounds when changing sheets HOT 2
- Is there a way to set copy and paste bindings on cyrillic layout? HOT 7
- Issues with auto_resize_row_index HOT 1
- 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
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.