Create a button
btn_button1 = tk.Button(root, text = "Button 1", fg = "black", command=btn_button1_clicked)
btn_button1.place(x=400, y=30)
#Or to set button dimensions:
btn_button1.place(x=10, y=40, width=60, height=18)
Setting properties
#Height
height=1 #You can only set as integer number of lines, use place to fine set width and height)
Respond to a button press
#****************************************
#****************************************
#*********** BUTTON 1 CLICKED ***********
#****************************************
#****************************************
def btn_button1_clicked():
#Do something...
Up Down Left Right buttons example
#Label
lbl_loadcell_weight = tk.Label(root, text = "?g",
bg="white", relief="groove",
width=8,
borderwidth=2,
font=('', 12, 'bold')) #'normal', 'bold', etc)
lbl_loadcell_weight.place(x=0, y=30)
#Down button
btn_weight_value_down = tk.Button(root, text = "▼", fg = "black", width=2, command=btn_weight_down_clicked)
btn_weight_value_down.place(x=86, y=29)
#Up button
btn_weight_value_up = tk.Button(root, text = "▲", fg = "black", width=2, command=btn_weight_up_clicked)
btn_weight_value_up.place(x=110, y=29)
#Left button
btn_weight_value_left = tk.Button(root, text = "◀", fg = "black", width=2, command=btn_weight_left_clicked)
btn_weight_value_left.place(x=86, y=54)
#Right button
btn_weight_value_right = tk.Button(root, text = "▶", fg = "black", width=2, command=btn_weight_right_clicked)
btn_weight_value_right.place(x=110, y=54)
