开发者

HOw to add combobox/dropdownbox in Action script 3 in FLEX

I have searched a lot but could fou开发者_StackOverflow社区nd a code where i can add comobox on screen CAn anyone give me example . like

Var combobox = new Combobox();

i don't have any gui

Where can i get the list/attributes of all the components like API for use in AS3


API is at http://livedocs.adobe.com/flex/3/langref/mx/controls/ComboBox.html


You're not being very clear with the question. If you want to add a ComboBox to the screen in AS3, your code works, except you need to attach it to something. e.g.,

var c:ComboBox = new ComboBox();
c.dataProvider = yourData;
someCanvas.addChild(c);

However, if you want to build your own ComboBox and have it pop up in a similar way, you're treading into more complicated land. The basics are that it's just a TextInput control where you use the PopupManager to show/hide a List object depending on the user action (e.g., click, typing, etc...). But you will run into lots of focus/event issues.

Take a look at the ComboBox source code in the Flex SDK.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜