Why not use a tileList or if spark, a List with tile layout. You can use a custom itemrenderer which can re-render when additional buttons are added and in rendering, can determine the optimum size based on running an algorithm on your dataprovider. There are all sorts of edge conditions to worry about (what if the total text width exceeds that of your container etc., etc.., but those have to be dealt with in any case, and I imagine you need a custom renderer anyway, to build your list items.
--- In [email protected], "James" <garymoorcroft_...@...> wrote: > > I'm lost as to what component to use for navigation within my application. > Across the top of my app I want something which horizontally displays a list > of categories which the user can click to select. This is fine if I use a > tilelist but I also want to allow my client to add and remove categories and > for the width of the component to adjust so that new categories fit in but it > seems impossible to apply <fit to content> to a tilelist the way you can to a > hbox which obviously means scrollbars will appear and if you switch the > scroll policy off this simply means any added categories won't be visible if > they are past the set width. > > If a hbox had a selecteditem property that would be perfect. Is there any > such way of getting a component to work like this? >

