question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[QUESTION] Possible to "undim" a specific table column ?

See original GitHub issue

I’m coding a cli tool to visualize chess games results

Selection_595

I picked a Table configured with row_styles=["dim", ""] for the main layout, but would like the dim effect to not apply for the first column as I use unicode symbol to represent user side (black or white), having the white pawn becoming grey on every other row is an undesired behaviour.

It’s easy to “dim” a whole column by applying style="dim" when calling add_colum but is the reverse operation possible and setting a style that cancel the eventual dim of the rows for a specific column ?

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
willmcgugancommented, Apr 11, 2022

@wasi-master 's suggest is good. Alternatively you could do the zebra stripping yourself.

1reaction
wasi-mastercommented, Apr 11, 2022

@Kraymer Well this works:

table = Table(
    row_styles=["dim", ""],
)
table.add_column("1")
table.add_column("2")
for idx in range(5):
    table.add_row(Text("plop", style="not dim"), "plip")
console.print(table)

image

Probably not the best solution, but hey, if it works, it works.

You’ll need to import Text from rich.text

Read more comments on GitHub >

github_iconTop Results From Across the Web

Tables in HTML documents
11.1 Introduction to tables. The HTML table model allows authors to arrange data -- text, preformatted text, images, links, forms, form fields, other...
Read more >
PHP: Generating a html table through a form [duplicate]
The user can input data in the form, but I the problem is that when I try to generate the table, PHP will...
Read more >
columns().every() - DataTables
Iterate over each selected column, with the function context set to be the column in question. Description. A typical operation with the DataTable...
Read more >
How to batch convert table columns to categorical - MathWorks
I have a large table (large number of columns and very large number of rows), many of these columns contain simple cell arrays...
Read more >
How to Add Column at Specific Location in Table?
Question : How to Add Column at Specific Location in Table? Answer: Order of the column in the table should not matter.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found