Version 0 of size and proportion of widgets

Updated 2003-08-10 09:09:30

Aug 10, 2003

Common problems in the path of Tk beginners:

  • You design the default size and position of your app very carefully. It always starts with the same size. And at the very same spot on your screen. You provide an ideal amount of space between any two individual widgets. The whole set looks perfect. But all is lost in a different screen resolution.
  • You make a text widget in your app. After some time (minutes or days) you maximize the app for the first time. The app is maximized, but the text widget and everything else keep the same size and is now surrounded by a lot of gray space.

In HTML, the use of percentage measures is very common and trivial. In Tk, you have to calculate and generate the right sizes and proportions yourself.

That may not be a lot of fun. You'll spend quite some time working with the dreaded expr command, and probably also many levels of nested brackets...