|
2010-10-21
| ||
| 18:25 | • Closed ticket [3091872fff]: grid size&rowconfigure memory after destroying all children plus 7 other changes artifact: b017128267 user: oehhar | |
| 18:25 | • Ticket [3091872fff]: 4 changes artifact: 0c1498df8b user: oehhar | |
| 17:26 | • Ticket [3091872fff]: 4 changes artifact: 2999c15c00 user: pspjuth | |
| 17:22 | • Ticket [3091872fff]: 4 changes artifact: 1c63973e68 user: pspjuth | |
| 16:56 | • Ticket [3091872fff]: 4 changes artifact: 51702046e5 user: oehhar | |
| 09:20 | • New ticket [3091872fff]. artifact: b88d9b4022 user: oehhar | |
| Ticket UUID: | 3091872 | |||
| Title: | grid size&rowconfigure memory after destroying all children | |||
| Type: | Bug | Version: | obsolete: 8.5.9 | |
| Submitter: | oehhar | Created on: | 2010-10-21 09:20:36 | |
| Subsystem: | 49. [grid] | Assigned To: | pspjuth | |
| Priority: | 5 Medium | Severity: | ||
| Status: | Closed | Last Modified: | 2010-10-21 18:25:06 | |
| Resolution: | Invalid | Closed By: | oehhar | |
| Closed on: | 2010-10-21 11:25:06 | |||
| Description: |
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.
| |||
| User Comments: |
oehhar added on 2010-10-21 18:25:06:
allow_comments - 1 oehhar added on 2010-10-21 18:25:05: Thank you Peter, sorry pspjuth added on 2010-10-21 17:26:19: Thinking a bit further, extending "all" to mean something other than the current becomes a semantic nightmare. To clear a grid, you either have to destroy and recreate the parent, or loop through what [grid size] says and reset columns and rows. pspjuth added on 2010-10-21 17:22:56: 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. oehhar added on 2010-10-21 16:56:28: 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". | |||