1

how do you change the BackgroundColor of a cell/ row with tkintertable? There is the command setcellBackground color, but it doesn't seem to work. Does anyone have an idea?

2 Answers 2

2

It really depends on the widget (Entry, Text, Listbox,...) you are placing on a certain row and column.

In a first part, you define the properties of the object, for example:

list = Listbox(root, borderwidth=0, background='white')

And then you tell tkinter where you want him to place the listbox:

list.grid(row=0, column=1)

Is it clear ?

Please tell me which widget you want to put in your grid, it would be easier to help you!

Sign up to request clarification or add additional context in comments.

3 Comments

Not the normal tkinter grid. The tkintertable table... Thats an own module, that has different functions
Have you read this @IcyTV ? ###Set preferences Preferences for the table can be set on the constructor method, for example: TableCanvas(frame, model=model, cellwidth=50, cellbackgr='#E3F6CE', thefont="Arial 10",rowheight=16,editable=False, rowselectedcolor='yellow',reverseorder=1) You can use cellbackgr='#E3F6CE' to choose the color of cells. Does it solve it ?
Hi, no it doesn't really, because you set the color for all cells. See below for what worked
0

with a bit of digging I found an answer, not the perfect solution, but doesn't matter: You need to edit the color of the model itself with the command:

setColorAt()

The setcellColor() command still doesn't work. Have fun and maybe someone can actually make sense of the command: documentation is on this site tkintertable documentation

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.