This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Tkinter | |
root = Tkinter.Tk() | |
import Pmw | |
Pmw.initialise(root) | |
counter1 = Pmw.Counter(increment = 2) | |
counter1.pack(padx = 10, pady = 10) | |
counter1.setentry(50) | |
root.mainloop() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Tkinter | |
root = Tkinter.Tk() | |
import Pmw | |
Pmw.initialise(root) | |
counter2 = Pmw.Counter(datatype = 'time', increment = 60) | |
counter2.configure(increment = 60*10) # Berguna untuk menambahan/mengurangi nilai menit sebanyak 10 menit | |
counter2.setentry('00:00:00') | |
counter2.pack(padx = 10, pady = 10) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Tkinter | |
root = Tkinter.Tk() | |
import Pmw | |
Pmw.initialise(root) | |
counter3 = Pmw.Counter(orient = 'vertical', increment = 2) # orient berguna untuk menentukan format tanda panah, apakah vertical atau horizontal | |
counter3.pack(padx = 10, pady = 10) | |
counter3.setentry(50) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Tkinter | |
root = Tkinter.Tk() | |
import Pmw | |
Pmw.initialise(root) | |
counter4 = Pmw.Counter(orient = 'vertical', increment = 2) | |
counter4.pack(padx = 10, pady = 10) | |
counter4.setentry(50) | |
print counter4.configure('increment') # Hasil print di tampilkan di Terminal |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Tkinter | |
root = Tkinter.Tk() | |
import Pmw | |
Pmw.initialise(root) | |
counter5 = Pmw.Counter(increment=2) | |
counter5.pack(padx = 10, pady = 10) | |
counter5.setentry(50) | |
counter5.configure(downarrow_background = 'green', uparrow_background = 'red') # Berguna untuk mengubah warna anak panah ke atas menjadi warna merah, anak panah ke bawah menjadi warna hijau) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Tkinter | |
root = Tkinter.Tk() | |
import Pmw | |
Pmw.initialise(root) | |
counter6 = Pmw.Counter(hull_relief = 'sunken', hull_borderwidth = 5, orient = 'vertical', datatype = 'time', increment = 60) | |
counter6.setentry('00:00:00') | |
counter6.pack(padx = 10, pady = 10) | |
counter6.configure(downarrow_background = 'blue', uparrow_background = 'yellow') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from Tkinter import * | |
import Pmw | |
root = Tk() | |
root.option_readfile('optionDB2') | |
root.title('Prompt Dialog') | |
Pmw.initialise() | |
dialog = Pmw.PromptDialog(root, title='Password', label_text='Password:', | |
entryfield_labelpos=N, entry_show='*', defaultbutton=0, | |
buttons=('OK','Cancel')) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from Tkinter import * | |
import Pmw | |
root = Tk() | |
root.option_readfile('optionDB2') | |
root.title('Paned Widget') | |
Pmw.initialise() | |
pane = Pmw.PanedWidget(root, hull_width=400, hull_height=300) | |
pane.add('top', min=100) | |
pane.add('bottom', min=100) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from Tkinter import * | |
import Pmw | |
root = Tk() | |
root.option_readfile('optionDB2') | |
root.title('Scrolled Text') | |
Pmw.initialise() | |
st = Pmw.ScrolledText(root, borderframe=1, labelpos=N, | |
label_text='Blackmail', usehullsize=1, | |
hull_width=400, hull_height=300, |
OlderNewer