예제 #1
0

title_box = Box(app, width=800, height=50, grid=[0, 0], border=True)
Text(title_box, text="PT. PERDAMAIAN INDONESIA")
Text(title_box, text="Penimbangan Minyak")

box = Box(app, width=800, height=430, align="left", grid=[0, 1], border=True)
list_box = ListBox(box,
                   items=[],
                   width=400,
                   height=430,
                   grid=[0, 1],
                   align="left",
                   command=on_select,
                   scrollbar=True)
list_box.text_size = 20
get_produk()

label_Box = Box(box, height=100, width=100, align="top", grid=[1, 1])
label_Box = Box(box,
                height=100,
                width=350,
                align="top",
                grid=[1, 2],
                border=True)
label_Produk = Text(label_Box, text="Nama Produk", size=22)
label_Kg = Text(label_Box, text="XXX g", size=24)

label_Box = Box(box, height=40, width=50, align="top", grid=[1, 3])
button = PushButton(box,
                    align="top",
예제 #2
0
window.hide()

lspacer = Box(window, grid=[0,0], width=20, height=500)
left_box = Box(window, grid=[1,0])
mspacer = Box(window, grid=[2,0], width=40, height=500)
right_box = Box(window, grid=[3,0])
rspacer = Box(window, grid=[4,0], width=20, height=500)

# LeftBox
listBoxTitle = Text(left_box, "All Work Orders", grid=[0,0], size=16, color="Dark Blue",\
                       font="Quicksand Medium")
instructions = Text(left_box, "click to add boat to Today's List", grid=[0,1], color="Dark Blue")
fullList = ListBox(left_box, items = boatlist, command = write_wo, width = 500, height = 345, grid=[0,2],\
                      scrollbar=True)  
fullList.bg = (200, 230, 255)
fullList.text_size = 16
fullList.tk.children["!scrollbar"].config(width=25) # access the tkinter object to resize the scrollbar
fullList._listbox.resize(None, None) # to show scrollbar, reset internal listbox size
fullList._listbox.resize("fill", "fill") # now fill available space

# Missing Name Button
infobutton = PushButton(left_box, text = "Missing Name?", padx=5, command = info_button, align="bottom", grid=[0,3])
infobutton.text_color = "Dark Blue"
infobutton.text_size = 14
infobutton.bg = (110, 170, 255)

# RightBox
todaysList = Text(right_box, text="Today's List", size=16, color="Dark Blue", font="Quicksand Medium")
listInstruct = Text(right_box, text="click to remove boat from Today's List", color="Dark Blue")
display = ListBox(right_box, items = todays_boats, command = delete_name ,\
                  width = 350, height = 345, scrollbar=True)
예제 #3
0
box = Box(app, grid=[0, 0], height=15, width='fill')
"""Left padding"""
box = Box(app, grid=[0, 0], height='fill', width=15)
"""Left content"""
# Get venv button
get_venvs = PushButton(app,
                       list_virtualenvs,
                       text='Load virtualenvs',
                       grid=[1, 1],
                       width=20)
get_venvs.text_size = 14
get_venvs.bg = btn_bg
box = Box(app, grid=[1, 2], height=15, width='fill')
# List box
venv_list = ListBox(app, align='left', grid=[1, 3], height=400, width=250)
venv_list.text_size = 14
venv_list.bg = 'white'
box = Box(app, grid=[1, 4], height=15, width='fill')
# Activate venv button
activate = PushButton(app,
                      activate_venv,
                      text='Activate',
                      grid=[1, 5],
                      align='left')
activate.text_size = 14
activate.bg = btn_bg
activate.width = 8
# Delete venv button
delete = PushButton(app,
                    delete_venv,
                    text='Delete',