-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Labels
enhancementNew feature or requestNew feature or requestgood first issueGood for newcomersGood for newcomershelp wantedExtra attention is neededExtra attention is needed
Description
I'm struggling with the following code... At the moment the Accept and Cancel buttons are not visible until you scroll all the way down through every checkbox option. Can you see an easy way to make ONLY the checkboxes scrollable, and have the buttons always visible at the bottom of the window?
[cleversetup] easypypi/easypypi.py (Lines 920-964)
def prompt_with_choices(group, choices, selected_choices):
"""
Creates a scrollable popup using PySimpleGui checkboxes or radio buttons.
Returns a set of selected choices, or and empty set
"""
if group in ["Development Status", "License :: OSI Approved ::"]:
layout = [
[
sg.Radio(
text=choice,
group_id=group,
key=choice,
default=choice in selected_choices,
)
]
for choice in choices
]
else:
layout = [
[sg.Checkbox(text=choice, key=choice, default=choice in selected_choices)]
for choice in choices
]
buttons = [sg.Button("Accept"), sg.Button("Cancel")]
if group == "License :: OSI Approved ::":
buttons += [sg.Button("License Help")]
choices_window = sg.Window(
f"Classifiers for the {group.title()} group",
[
"",
[
sg.Column(
layout + [buttons],
scrollable=True,
vertical_scroll_only=True,
size=(600, 300),
)
],
],
size=(600, 300),
resizable=True,
keep_on_top=SG_KWARGS["keep_on_top"],
icon=SG_KWARGS["icon"],
)
while True:
event, values = choices_window.read(close=False)
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or requestgood first issueGood for newcomersGood for newcomershelp wantedExtra attention is neededExtra attention is needed