combobox design
Copy link to clipboard
Copied
how to modifier side bar become bigger??i look too small
Copy link to clipboard
Copied
Did you look in your library at the components skins?
edit:
I think you should simply consider leaving the text at a smaller size while scaling the entire component up. The text and the scrollbar will scale together.
Copy link to clipboard
Copied
i dun how do edit here.... the scollbar stii same.. where should i edit?
Copy link to clipboard
Copied
What I was referring to was the old "put the component in a DisplayObject" and scale the DisplayObject up trick which seems to have been changed. Now just the ComboBox's off state is affected but the internal list is no longer affected by it.
What you want to do is actually very complicated unfortunately, simply due to nesting components inside components inside components.
A ComboBox has a List component which extends SelectableList which extends BaseScrollPane which has the _verticalScrollBar reference set to ScrollBar which is a public static CONST set to 15 for width. Yes, it's that's complicated. In order for you to actually affect the width you'll need to subclass all of these and edit the component source to create a custom version so you can simply change the static const WIDTH in ScrollBar to your desired width. You can find your components source to play with in the usual place:
Flash\Common\Configuration\Component Source\ActionScript 3.0\User Interface\fl
This is a pretty complicated thing to do, to the point you'll need to subclass so many classes, most people just go online and grab an alternate ComboBox. Just fair warning before you jump in there.
Inspect your component in the Debugger and you'll see your path to those settings (ComboBox.list._verticalScrollBar.WIDTH), but you have no access to the property, so you'll need to custom subclass to gain access.
Copy link to clipboard
Copied
it is too completcated for me....now i am develping mobile appilcation...
it is possible using hand scroll the panel without scroll the scrollbar ??
it is possible??
Copy link to clipboard
Copied
That's not how it works and even the mobile optimized components (Spark in Flex) don't recommend using their ComboBox on mobile.
To my knowledge, no it cannot be scrolled in that manner. However you can probably work around that and introduce that functionality yourself.
The dropdown property of the ComboBox gives you a reference to the List contained inside. The List component contains a get/set verticalScrollPosition property you can utilize to scroll that list.
One way to do it is listen to the ComboBox for the Event.OPEN, which means the user opened the list. After that you have a few ways you can handle scrolling. One way would be to attach a MouseEvent.MOUSE_MOVE listener to the ComboBox. As a finger moves on the list you can determine each event which direction the finger is moving by examining the x/y position. Then simply adjust verticalScrollPosition on the list. Be sure to clean up by adding a listener on close or change so you remove the MouseEvent.MOUSE_MOVE listener from the ComboBox once the user is done. This shouldn't interrupt normal selection on the list as long as you set a threshhold for movement before you actually scroll the list (such as don't move the list unless the user moves more than 10 pixels, etc).
On a side note, if you're developing for mobile I would strongly encourage you to consider using Feathers UI components with Starling. That said, they do not have a ComboBox or I already would have recommended it. But if you're using components you really should consider them.
They are a collection of easy to use, GPU accelerated (native performance feeling) components that work very similar to existing Flash components. You can find a demo of them here:
http://feathersui.com/examples/components-explorer/
Remember you also need Starling so you'd download Starling here:
http://gamua.com/starling/download/
Then Feathers UI:
http://feathersui.com/download/
You should start to use as many of these components as possible. You're also free to build your own but I find these components are very well written. Skinning is much less complex and there's some great documentation. Again, there is no ComboBox (yet) but keep an eye out for it.
Copy link to clipboard
Copied
mean that i can using MouseEvent.MOUSE_MOVE listener to the ComboBox to scroll by finger....
but i am still no idea how to add this into my coding..
sorry i am still a beginner...
can give some example or rough example...
appreciate for help

