22 - Adding a child after
What is the enhancement in mind? How should it look and feel?
Say I have an existing container to which I want to add a widget. Right now the only method to do that is "AddChild". But this way I cannot control where my widget will appear, it will always appear at the end of my container, a AddChildAfter(widget, sibling) method would be handy.
Please provide any additional information below.
This problem is aggravated by the fact that if the last sibling is set to fill the remaining container space (quite common for TreeGroups for example) my widget seems to not even be displayed.
| User | When | Change |
|---|---|---|
| Nevcairiel | Feb 15, 2009 at 12:14 UTC | Changed status from New to Fixed |
| Mokhtar | Feb 06, 2009 at 22:21 UTC | Create |
- 3 comments
- 3 comments
Facts
- Last updated
- Feb 15, 2009
- Reported
- Feb 06, 2009
- Status
- Fixed - Developer made requested changes. QA should verify.
- Type
- Enhancement - A change which is intended to better the project in some way
- Priority
- Medium - Normal priority.
- Votes
- 0
- Reply
- #3
Nevcairiel Feb 15, 2009 at 13:57 UTC - 0 likesI've changed the behaviour to add the widget before the specified widget, since it eliminates the need for the special "1" case.
- Reply
- #2
Nevcairiel Feb 15, 2009 at 12:14 UTC - 0 likesI extended the API of AddChild to take an optional third argument "previousWidget", doing exactly the same as you described, just in the same (old) API call.
Additionally you can also pass the number 1 as the third argument to insert the widget at the first position in the list.
- Reply
- #1
Mokhtar Feb 06, 2009 at 22:41 UTC - 0 likesThis seems to do the job :