I need a pop-up message that will take a text input. I need a button to submit the input and one to abort the entire program. I have one solution, but I would rather have one that I am not paying $99 per year for a pop-up. Here is what I have. Could you guys show me another way to do the pop-up?
[/url][/img]
for x in range (numberOfFiles):
row_data = read_data.iloc[x]
ts = row_data.iloc[0]
if ts == target_ts:
target_row = x
break
if x == (numberOfFiles - 1):
bad_ts = True
while bad_ts:
# setup message box
layout = [[sg.Text('Invalid TS- number')],
[sg.Text('Enter valid number'), sg.InputText()],
[sg.Button('Submit'), sg.Button('Abort Test')]]
# Create the Window
window = sg.Window('Window Title', layout)
# Event Loop to process "events" and get the "values" of the inputs
while True:
event, values = window.read()
if event == sg.WIN_CLOSED or event == 'Abort Test': # if user closes window or clicks cancel
if event == 'Abort Test':
exit()
break
target_ts = values[0]
window.close()[/color]
for x in range(numberOfFiles):
row_data = read_data.iloc[x]
ts = row_data.iloc[0]
if ts == target_ts:
target_row = x
bad_ts = False
break
[/url][/img]
Larz60+ write Aug-28-2024, 07:22 AM:
Please post all code, output and errors (it it's entirety) between their respective tags. Refer to BBCode help topic on how to post. Use the "Preview Post" button to make sure the code is presented as you expect before hitting the "Post Reply/Thread" button.
Tags have been added. Please use BBCode tags on future posts.
Please post all code, output and errors (it it's entirety) between their respective tags. Refer to BBCode help topic on how to post. Use the "Preview Post" button to make sure the code is presented as you expect before hitting the "Post Reply/Thread" button.
Tags have been added. Please use BBCode tags on future posts.
