This is a solved problem by at least one person. But an issue avoided by the experts – read on.
I am working on a multi-widget demo for an article that will tout using Excel to layout a screen and calculate grid dimensions as a “plan” to guide app construction. One of the things I am doing is using the relatively new LabelFrame widget to establish column widths in column 0. It helps to have those set-in stone since we all know the design will probably be modified as we go. This step greatly aids visualization.
So right out of the box I encounter the problem that, when I stick a short Label inside one of the top seven LableFrame widgets, the LabelFrame shrinks to just what it needs. Of course, that screws up my design. But that is OK because I am aware of the propagate() command which turns that off. Right? Wrong.
Virtually every good source on the internet parrots back the “official line” of what it is supposed to do, but nobody gives you a working example. Not one. You know why? Because they don’t know how to make it work either. Shipman didn’t know, Effbot doesn’t know, even my absolute go-to-guy on stackoverflow, Brian Oakley, avoids the issue saying propagate is an “advanced topic”.
Bullshit, I don’t think he knows either.
So, I sat down and experimented with every variation and clue I could find: use place instead of pack or grid, give weight to the widgets, try setting column and row widths. Finally, it was dumb luck to the rescue. You want to know the secret? Here it is: create all your widgets with children, pack, grid or place the children, THEN pack, grid, or place the parent. The ORDER in which you build them makes propagate work or not work.