I'd like to have a Frame
, where the user could add as many textfields as needed by the application.
The application starts with a textfield, and a button below that textfield. When the user presses the button, a new text entry will be added below the first one ( this may be repeated countless times ). In the middle of the window, there will be a Text
widget, used to display text :)
However, I noticed this in the documentation:
This widget is used to implement scrolled listboxes, canvases, and text fields.
Is there a way to use the Scrollbar
with a Frame
?
If you can use Tix, there is the ScrolledWindow widget which has a
window
Frame and one or two Scrollbar widgets:Change the size of the root window. You will want to add code to the focus_get event of the Entry widgets to scroll the ScrolledWindow when tabbing through the keyboard.
Otherwise, you will have to use a Canvas widget (you can add Label, Entry and Text subwidgets) and write a lot more code yourself to implement your required functionality.
The following is an example of auto hiding scrollbars that only works if you just use the grid geometry manager, taken from the
effbot.org
documentation: