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

Segmented Vertical Button + ComboBox in Input Dialog #1898

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

PolRubio
Copy link

Segmented Vertical Button is created. It's a copy of the original Segmented Button, but it makes the buttons to appear vertically instead of horizontally. All the logic behind is exactly the same, it is only a visual change.

@PolRubio PolRubio changed the title Segmented Vertical Button Segmented Vertical Button + ComboBox in Input Dialog Aug 10, 2023
@PolRubio
Copy link
Author

In this second version, you can pass a list of values when creating an Input Dialog. When a list is passed, the entry widget is replaced by a combo box entry with the values passed. All the logic behind is exactly the same, it is only an entry change.

@PhilipNelson5
Copy link

I am interested in this feature. I took a quick look at the code for the segmented button and it looked like you could add a vertical=False option to the current segmented button constructor, then check for that option and change the way the buttons are added to the grid in CTkSegmentedButton._create_button_grid. It seemed like the rest of the logic should be the same. But like I said, it was only a quick look, I may have overlooked something. What do you think?

@PolRubio
Copy link
Author

Hi @PhilipNelson5, I think it's a great improvement. You are right, the only modifications from the original segmented_button are in the _configure_button_corners_for_index() and in the _create_button_grid().

@PhilipNelson5
Copy link

Glad we came to the same conclusion. I opened #2333 with just the changes for CTKSegmentedButton

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

Successfully merging this pull request may close these issues.

2 participants