No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.
How can i set a frame according to parent window size? I was trying to set it but it is taking only region where button displayed from Tkinter import * class Example: def __init__(self, parent): self.parent = parent self.parent.title("CBLFinder") self.initUI() def initUI(self): self.frm1=Frame(self.parent,background="white",\ borderwidth=5,relief="sunken",\ width=400,\ height=500) #print self.parent.winfo_reqwidth(),self.parent.winfo_reqheight() btn=Button(self.frm1,text="Submit",command=self.update_frame) btn.grid(row=2,column=2,padx … |
|
I have generated checkbutton from inputstatus dictionary to set as default values.After tht once it get display on GUI when i select it respected text and status will be added to new dictionary '''inputstatus = { 'maggi': 1, \ 'pizza': 1, \ 'cold drinks': 1, \ 'fries': 1, \ 'chapati': … |
|
Suppose i have one dictionary menu={'pizza':1,'Burger':1,'sandwitch':0} when i run tkinter gui these all key will be displayed on GUI. If value is 1 then respected key must be ticked rest will be unticked |
|
There is one application where two radio buttons are available.i.e default and custom. If custom is selected then one panel will be visible which contain available drives list of not selected checkbox which are generated based on list but while i am doing such things it generate checkbox many time … |
|
from Tkinter import * from ttk import Style class Example(Frame): def __init__(self, parent): Frame.__init__(self, parent, background="#333") self.parent = parent self.parent.title("sample") self.parent.iconbitmap('sample.ico') self.pack(fill=BOTH, expand=1) self.centerWindow() self.initUI() def centerWindow(self): w = 500 h = 450 sw = self.parent.winfo_screenwidth() sh = self.parent.winfo_screenheight() x = (sw - w)/2 y = (sh - h)/2 self.parent.geometry('%dx%d+%d+%d' … |