The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.
|
 |
|
Dev Shed Forums
> Programming Languages
> Python Programming
|
Tkinter
Discuss Tkinter in the Python Programming forum on Dev Shed. Tkinter Python Programming forum discussing coding techniques, tips and tricks, and Zope related information. Python was designed from the ground up to be a completely object-oriented programming language.
|
|
 |
|
|
|
|

Dev Shed Forums Sponsor:
|
|
|

November 19th, 2003, 08:19 PM
|
 |
Only the strong survives!!.
|
|
Join Date: Feb 2003
Location: A World of wonders.
|
|
|
Tkinter
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
|
 |
Hello World :)
|
|
Join Date: Mar 2003
Location: Hull, UK
|
|
|
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()
Mark.
__________________
programming language development: www.netytan.com – Hula
|

November 20th, 2003, 05:35 PM
|
 |
Only the strong survives!!.
|
|
Join Date: Feb 2003
Location: A World of wonders.
|
|
|
nice.. so one more thing.. what if i wanted to add a spce in between them
|

November 20th, 2003, 07:04 PM
|
 |
Hello World :)
|
|
Join Date: Mar 2003
Location: Hull, UK
|
|
Very quick answer 
|

November 20th, 2003, 07:06 PM
|
 |
Hello World :)
|
|
Join Date: Mar 2003
Location: Hull, UK
|
|
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()
Mark.
|

November 20th, 2003, 09:29 PM
|
 |
Only the strong survives!!.
|
|
Join Date: Feb 2003
Location: A World of wonders.
|
|
got ya buddy..  thanx
|
Developer Shed Advertisers and Affiliates
| Thread Tools |
Search this Thread |
|
|
|
| Display Modes |
Rate This Thread |
Linear Mode
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|
|