From: SourceForge.net <no...@so...> - 2010-10-21 10:22:56
|
Bugs item #3091872, was opened at 2010-10-21 11:20 Message generated for change (Comment added) made by pspjuth You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=112997&aid=3091872&group_id=12997 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: 49. [grid] Group: current: 8.5.9 Status: Open Resolution: None Priority: 5 Private: No Submitted By: Harald Oehlmann (oehhar) Assigned to: Peter Spjuth (pspjuth) Summary: grid size&rowconfigure memory after destroying all children Initial Comment: Issues: - grid size does not report "0 0" when all children are destroyed - there is a row without widgets occupying space Demo: newly started wish 8.5.9 on windows vista 32 bit: % grid size . 0 0 % grid [frame .f1 -bg yellow -width 10 -height 10] -sticky news % grid [frame .f2 -bg red -width 10 -height 10] -sticky news % grid rowconfigure . all -weight 1 Resize the window to test % destroy {*}[winfo children .] % grid size . 0 2 This should say "0 0" % grid rowconfigure . 1 -weight 1 Should this be forgottn ? % grid [frame .f1 -bg yellow -width 10 -height 10] -sticky news If you resize the window now, the yellow bar does not go to the end. A cell without a widget is placed there. ---------------------------------------------------------------------- >Comment By: Peter Spjuth (pspjuth) Date: 2010-10-21 12:22 Message: It is expected behaviour that a row with non-default configuration is included in [grid size], so the "0 2" is correct. "all" affects rows with widgets in them, so that is expected too. This is as specified in TIP147. Though it might be preferrable to actually mean every row. That the added frame does not extend all the way is expected too, since it is on row 0 and row 1 still has weight on it. So, everything you describe is as expected. What could be done is extend "all" to do all rows, to simplify clearing but i would hesitate to do so since it would not be backward compatible. ---------------------------------------------------------------------- Comment By: Harald Oehlmann (oehhar) Date: 2010-10-21 11:56 Message: Some additional test results: - the size is maintained until the biggest valid rowconfigure or columnconfigure command. - "grid rowconfigure . all -weight 0" will not influence those ghost columns. One must use an explicit "grid configure . 2 -weight 0" to get rid of the gost columns - after destroying all children and setting all row and column configure options explicitly to the default values, "grid size ." will report "0 0". ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=112997&aid=3091872&group_id=12997 |