November 19th, 2003, 08:19 PM
if i was to code a Tkinter with just a frame,entry, button, how will change the width of the Tkinter to make the button fit on the same line as the entry?
November 20th, 2003, 09:01 AM
All to do with the pack() method.. too pack your entry box on one side, and your button on the other, the two main options your looking for are fill ('x' oy 'y') and expand which you need to set to True for it too work! Something like..
entry.pack(side = 'right', fill = 'x', expand = True)
button.pack(side = 'right', fill = 'x', expand = True)
None: thiis should also work with using grid() instead of pack()
November 20th, 2003, 05:35 PM
nice.. so one more thing.. what if i wanted to add a spce in between them
November 20th, 2003, 07:04 PM
Very quick answer
November 20th, 2003, 07:06 PM
Very quick answer , you can tell Tkinter how much space to add around the widget using the padx option.. if you want more power you should probably use grid() isntead of pack()
November 20th, 2003, 09:29 PM
got ya buddy.. thanx