Example #1
0
def File_New():
    msg = "Create a new file?"
    title = "New File"
    if easygui.ccbox(msg, title):
        input_box = guizero.TextBox(app, width = app.width, height = app.height, multiline = True, scrollbar = True)
        TextBox.update_command(txhx.hideit)
    else:
        exceptionbox()
            sleep(.2)
            mainmenu_window.show(wait=True)
            admin_mainmenu_pass_window.hide()
            password_box.value = ""
        else:
            password_chk_text.value = "incorrect"
            password_box.value = ""

    elif not password_box.value == admin_password:
        password_chk_text.value = "incomplete and incorrect"


password_box = TextBox(admin_mainmenu_pass_window, grid=[0, 0])
password_box.height = 30
password_box.width = 20
password_box.update_command(chk_password)
password_chk_text = Text(admin_mainmenu_pass_window, text="", grid=[1, 0])

#admin menu password window ends


#change admin password password window starts
def chk_chg_password():
    passw = readPwd()
    if len(pass_box.value) == 8:
        if pass_box.value == passw:  #admin_password:
            pass_chk_text.value = "correct"
            sleep(.2)
            change_password_window.show(wait=True)
            change_pass_password_window.hide()
        else:
Example #3
0
from guizero import App, TextBox, PushButton, Text, alerts
from tkinter.font import Font


def go():
    alerts.info("hi", "hi " + textbox.value)


def key_pressed(key):
    print("key pressed {}".format(key))


app = App()
text = Text(app, text="Enter your name")
textbox = TextBox(app, width=40)
textbox.update_command(key_pressed)
button = PushButton(app, text="Hi", command=go)
app.display()
            mainmenu_window.show(wait=True)
            admin_mainmenu_pass_window.hide()
            password_box.value = ""
        else:
            password_chk_text.value = "incorrect"
            password_box.value = ""
    
    elif not password_box.value == admin_password:
         password_chk_text.value = "incomplete and incorrect"
         
    
    
password_box = TextBox(admin_mainmenu_pass_window,  grid=[0,0])
password_box.height=30
password_box.width=20
password_box.update_command(chk_password)
password_chk_text = Text (admin_mainmenu_pass_window, text="", grid=[1,0])
#admin menu password window ends

#change admin password password window starts
def chk_chg_password():
    passw = readPwd()
    if len(pass_box.value) == 8:
        if pass_box.value == passw:#admin_password:
            pass_chk_text.value = "correct"
            sleep(.2)
            change_password_window.show(wait=True)
            change_pass_password_window.hide()
        else:
            pass_chk_text.value = "incorrect"
    
Example #5
0
    #prints values of variables to console for debugging
    #print(choice, choices, msg, title, retrieve, rescue)
    print("current directory: " + str(os.getcwd()))
    print("choices are " + str(choices))
    print("chosen document: " + str(choice))

    #opens chosen file
    fow = open(choice, 'r')
    thing = fow.read()
    try:
        input_box = guizero.TextBox(app, width = app.width, height = app.height, multiline = True, scrollbar = True, text = thing)
    except:
        exceptionbox()



#menubar for start window
app = App()
guizero.MenuBar(app,
                     toplevel=["File"],
                     options=[
                         [ ["New File", File_New], ["Open File", File_Open], ["Save File", File_Save] ]
                         ])


       TextBox.update_command(txhx.hideit)

app.display()

app.on_close(sys.exit([])) #closes app