What are Composite objects good for?
I'm just looking at the new persona window and seeing the use of composite objects therein. I admit I have no idea what those are good for. From they behaviour the appear identical to a page? Anyone know what's up with them?
|
From the user perspective they don't make any difference. From the designer perspective they arrange the children objects automatically. I prefer more exact control so I didn't use them in my persona window stats tab.
From the UIBuilder doc: Composite Parent : Page Page that automatically spaces visible widgets Orientation Horizontal/Vertical Spacing - gap size integer SpacingType Fill - make the widgets take up all the space Spread - spread the widgets equally Constant - fixed spacing Alignment Front - left/top Center - center Back - right/bottom Padding - Internal - spacing between items External - spacing on the outside Both - spacing both between and on the outside |
What Othesus said plus allot of the overhead that a page has is not there. I use them to hold my user effect or any thing I want evenly spaced out.
|
One nice advantage you get with a Composite is that the spacing dynamically updates as objects are show/hidden. For example SOE has been using them with a nested page and auto-hiding scrollbar. When the scrollbar hides, the page expands to fill the empty space.
Back in the day, composites didn't work right so I didn't implement them on a wide scale, but have been slowly adding them where useful. |
Note to self: RTFM. :) Thanks you all.
I had only looked at them in UIbuilder and no automatic spacing happens therein. Sounds like an interesting control then, basically like a volume page in just one direction. Would be interesting to hear from Rothgar what is most efficient, automatic placement via PackLocation, via a Composite or via a VolumePage. |
As far as performance goes, I'm not sure if there is a noticeable difference between the three methods to really worry about it. I really do like Composite objects though, because I'm a stickler for things being lined up properly and looking nice when pages are resized. And like Zonx mentioned, it works great for when a page hides a vertical scrollbar.
|
Thanks Rothgar. I agree they are nice. I'm using two vertical composites on my persona window as well now, in addition to the volume pages I always used there (I like correct spacing as well ;)).
And the scrollbar idea is good, I know a couple of windows I will update with that, getting rid of the OnShow code I currently have doing the same thing. |
All times are GMT -5. The time now is 10:07 AM. |
vBulletin® - Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
© MMOUI