Home Tutorials Forums Articles Blogs Movies Library Employment Press
Old 02-02-2010, 12:15 AM   #1
urano
Member
 
Join Date: Jul 2009
Location: Oakland, CA
Posts: 99
Default [AS3] How Customize comboBox

to the forum,

This is a comboBox dropdown problem.

The top and bottom borders have been removed from the the "Up_Skin" and "Disabled_Skin" states (from the "List / Cell Renderer Skins" group)

The result is a nice list with no separating lines, but we also now have a dropdown list that has no closing border.

I am trying to style the list border to compensate for this.

After a lot of research and trying various solutions, could really use some help with this one.

Any ideas will be appreciated.

** Should mention that I'm working in FlashDevelop, and can continue to customize the comboBox in Flash and export as a SWC, or preferably, would like to use AS3 to style as needed.

Last edited by urano; 02-02-2010 at 12:37 AM.
urano is offline   Reply With Quote
Old 02-02-2010, 04:51 PM   #2
urano
Member
 
Join Date: Jul 2009
Location: Oakland, CA
Posts: 99
Default

hi all,

I know this part of the boards are not as well traveled as the AS3, but if anybody can offer some help, I would greatly appreciate it.

Basically, any ideas on how to style the border of the dropdown list for a comboBox is what is needed.

thank you!!
urano is offline   Reply With Quote
Old 02-04-2010, 07:48 PM   #3
urano
Member
 
Join Date: Jul 2009
Location: Oakland, CA
Posts: 99
Default

Putting out another request for help with this problem.

in a nutshell:

How can the list object in a comboBox be customized - specifically for borders?

Thank you!!
urano is offline   Reply With Quote
Old 02-04-2010, 08:53 PM   #4
urano
Member
 
Join Date: Jul 2009
Location: Oakland, CA
Posts: 99
Default

OK, here is some code and more details.

I have removed all borders from the following skins in Flash via the comboBox component elements:
CellRenderer:
disableSkin
upSkin
selectedDisableSkin

This gives me a nice clean dropdown with no borders (no sides, no top, no bottom).

But I can't create a bounding box for the dropdown list (a border to include all the rows).

The comboBox uses this array which is a fixed set of data, 9 elements;
var categoryArray:Array = new Array

Here is the code where I try to style the dropdown list

ActionScript Code:
inputCategoryCB = new ComboBox(); inputCategoryCB.dropdownWidth = 159; inputCategoryCB.width = 159; inputCategoryCB.move(159, 56); inputCategoryCB.prompt = "Select One"; inputCategoryCB.rowCount = 9; inputCategoryCB.dropdown.rowHeight = 22; inputCategoryCB.dropdown.setStyle("borderStyle" , "solid"); inputCategoryCB.dropdown.setStyle("borderColor" , 0xCC0000); inputCategoryCB.dataProvider = new DataProvider(categoryArray); inputCategoryCB.selectedIndex = ComponentUtils.findItemIndex(inputCategoryCB, State.getState().itemCategory); inputCategoryCB.tabIndex = 1;


your help is really needed!!!!
thank you
urano is offline   Reply With Quote
Old 02-04-2010, 10:35 PM   #5
urano
Member
 
Join Date: Jul 2009
Location: Oakland, CA
Posts: 99
Default



SUCCESS!

I could not get the setStyle code to work in this situation.

My solutions was as follows:

1. the bottom border needs actually be part of the three skins. If it is deleted from the Cell Renderer skins, then the List_skin will not display.

2. if you want the cells to have no top or bottom borders that is accomplished by making them the same color as the background of the comboBox. In this case I made them a very light gray to show some row lines.

3. the side borders can then be set to be the same color as the List_skin element. this will display as a seamless box around the list items. The Cell Renderer skins will make up the sides and the List_skin makes the bottom.

4. I don't think the List-skin box will display if the Cell Renderer skins do not have some sort of L & R borders. i haven't tried yet.

This seems like a really ridiculous way to have to style a comBo box.

If anyone does know of a way that the List_skin border can be styled using AS3, I would still like to know.

cheers
urano is offline   Reply With Quote
Old 04-27-2012, 10:37 AM   #6
giobongio
Registered User
 
Join Date: Jan 2011
Posts: 30
Default

GENIOUS! I've been searching for this for a long long time.
And now it works. Thank you so much for sharing!
giobongio is offline   Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump


All times are GMT. The time now is 11:44 PM.

///
Follow actionscriptorg on Twitter

 


Powered by vBulletin® Version 3.8.5
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Ad Management plugin by RedTyger
Copyright 2000-2013 ActionScript.org. All Rights Reserved.
Your use of this site is subject to our Privacy Policy and Terms of Use.