GithubHelp home page GithubHelp logo

Comments (2)

ragardner avatar ragardner commented on June 12, 2024

Hello,

I am sorry to say that at the moment there is no setting inside tksheet to automatically handle this, the colors would have to be changed wherever your code disables (or enables) tksheets bindings

For example after your enable bindings line of code you would put:

sheet.set_options(
frame_bg = ..., # your color for enabled here
table_fg = ..., # your color for enabled here
table_bg = ..., # your color for enabled here
table_grid_fg = ..., # your color for enabled here
header_bg = ..., # your color for enabled here
)

and after your disable bindings line of code you would put:

sheet.set_options(
frame_bg = ..., # your color for disabled here
table_fg = ..., # your color for disabled here
table_bg = ..., # your color for disabled here
table_grid_fg = ..., # your color for disabled here
header_bg = ..., # your color for disabled here
)

These are all the color options you can use with set_options()

header_bg
header_border_fg
header_grid_fg
header_fg
header_selected_cells_bg
header_selected_cells_fg
header_hidden_columns_expander_bg
index_bg
index_border_fg
index_grid_fg
index_fg
index_selected_cells_bg
index_selected_cells_fg
index_hidden_rows_expander_bg
top_left_bg
top_left_fg
frame_bg
table_bg
table_grid_fg
table_fg
table_selected_cells_border_fg
table_selected_cells_bg
table_selected_cells_fg
resizing_line_fg
drag_and_drop_bg
outline_thickness
outline_color
header_selected_columns_bg
header_selected_columns_fg
index_selected_rows_bg
index_selected_rows_fg
table_selected_rows_border_fg
table_selected_rows_bg
table_selected_rows_fg
table_selected_columns_border_fg
table_selected_columns_bg
table_selected_columns_fg
popup_menu_font
popup_menu_fg
popup_menu_bg
popup_menu_highlight_bg
popup_menu_highlight_fg

It seems in your above code your bindings are disabled to begin with, so if you're not immediately enabling your Sheet bindings you would pretty much do as you have:

"""
going by your code here, assuming you have imported tksheet as ts
"""
sheet = ts.Sheet(root,
theme = 'dark',
frame_bg = 'white',
table_fg = 'black',
table_bg = 'grey',
table_grid_fg = 'black',
header_bg = '#073642')

Or you could use the set_options() function after creating the Sheet

Let me know if this doesn't help

from tksheet.

janez111 avatar janez111 commented on June 12, 2024

from tksheet.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.