|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Stay one step ahead of the competition. Evaluate and give feedback
on some of the hottest web development tools on the market today.
Make your opinion heard! Click
Here
|
|
#1
|
||||
|
||||
|
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?
![]()
__________________
IE QUOTE | PHP Manual | Google | C/C++ Compiler | Linux Tutorials | General Stuff Game Dev |
|
#2
|
||||
|
||||
|
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. |
|
#3
|
||||
|
||||
|
nice.. so one more thing.. what if i wanted to add a spce in between them
|
|
#4
|
||||
|
||||
|
Very quick answer
![]() |
|
#5
|
||||
|
||||
|
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. |
|
#6
|
||||
|
||||
|
got ya buddy..
thanx |
![]() |
| Viewing: Dev Shed Forums > Programming Languages > Python Programming > Tkinter |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|