Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to show complete cell content that is too long? #264

Open
chanwj opened this issue Jan 29, 2025 · 4 comments
Open

How to show complete cell content that is too long? #264

chanwj opened this issue Jan 29, 2025 · 4 comments

Comments

@chanwj
Copy link

chanwj commented Jan 29, 2025

If the cell content is too long that the text width is larger than the column width(which is fixed), it will automatically hide the oversized part now, but it is not friendly for users to read.

So I wonder if there is possibility to solve this problem, like the two ways below:

  1. The oversized content wrap and cell height resize to fit the content automatically.
  2. Show tooltips to show complete content when mouse hover it. (Maybe show "..." at the end of the content at the same time to remind users that there is something being hidden?)

I've already read the documentation and I didn't find the answer (I'm sorry if I missed).

@ragardner
Copy link
Owner

Hello,

You're correct that there is nothing in the docs about this sorry and you're correct about the current behavior.

Thank you for your ideas, I am not yet sure the best way to handle this, or if I even will implement something that addresses such shortcomings. I will have to get back to you after I have given it some thought sorry.

Kind regards

@chanwj
Copy link
Author

chanwj commented Jan 29, 2025

@ragardner

Thank you for your reply!

I also want to ask about this: After configuring auto_resize_columns, there is always extra spacing shows behind the last column. Is there any way to make the last column fit the widget's right border perfectly?

@ragardner
Copy link
Owner

I also want to ask about this: After configuring auto_resize_columns, there is always extra spacing shows behind the last column. Is there any way to make the last column fit the widget's right border perfectly?

I think the parameter you're after is: empty_horizontal which can be set at initialization or using Sheet.set_options()

e.g.

... = Sheet(parent, empty_horizontal=0)

# or

my_sheet.set_options(empty_horizontal=0)

@chanwj
Copy link
Author

chanwj commented Jan 30, 2025

@ragardner

Thanks! empty_horizontal works.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants