Copy link to clipboard
Copied
I can set most of the parameters of a comboBox, cb, by setting the attribute directly on the object, such as:
cb.rowHeight = 30;
cb.alpha = 100;
for row height and alpha respectively. But for other attributes such as bordercolor and thickness, it seems to use a setStyle function. So it compiles with:
cb.setStyle("borderColor", 0x75aa75);
cb.setStyle("borderThickness", 10);
but it doesn't seem to cause any change. Does it need some other method?
Ok. Not sure why that useful control of a comboBox appearance isn't available in AS3, but that will help avoid future confusion. Thanks.
Copy link to clipboard
Copied
that looks like you're trying to style the list component part of the combobox. is that correct?
Copy link to clipboard
Copied
It's the actual button I'm trying to style, the idle state before the drop down appears. Is there a path to that border, button width and color?
Copy link to clipboard
Copied
then you may want to edit the combobox skins (up, over, down):
from, https://help.adobe.com/en_US/as3/components/WS5b3ccc516d4fbf351e63e3d118a9c65b32-7f1c.html
You can change the color of the Up skin to change the color of the component in its inactive state on the Stage.
Create a new Flash file (ActionScript 3.0) document.
Drag the ComboBox component to the Stage.
Double-click it to open its palette of skins.
Double-click the Up skin until it is selected and open for editing.
Set the zoom control to 400%.
Click the center area of the skin until its color appears in the Fill color picker in the Property inspector.
Select color #33FF99 using the Fill color picker to apply it to the Up skin.
Click the Back button at the left side of the edit bar above the Stage to return to document-editing mode.
Select Control > Test Movie.
The ComboBox should appear on the Stage as shown in the following illustration.
Copy link to clipboard
Copied
Ok, that lets me set the border color and I see the other options for alignent, but I don't see any controls for the border width, or the downarrow button color or width. Are those also accessible in this interface?
Producing this with a specified border color, but too thin and without matching the pulldown button:
Trying to get to this:
There seems to be alot of relevant options here: https://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/fl/controls/ComboBox.html
Are they only for the drop down rows? Expressions like cb.setStyle("borderThickness", 10), using setStyle seem recognized, but don't produce any visible results.
Copy link to clipboard
Copied
it's probably easier to just create a movieclip that looks and does exactly what you want.
Copy link to clipboard
Copied
So the setStyle doesn't apply to this version on the comboBox? That seemed to have the applicable parameters, including the borderwidth.
https://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/mx/controls/ComboBox.html
Is that an option only for Flex, and not Flash? Is there not a corresponding attribute for the same comboBox component in AS3? The compiler seems to accept it, but the assigment doesn't change anything. There seems to be overlap between Flex and Flash, and I guess some Flex structures are recognized but ignored.
Copy link to clipboard
Copied
yes that looks applicable to the flex combobox.
mouseover products and check flash pro only. i don't think you'll see mx stuff anymore.
Copy link to clipboard
Copied
Ok. Not sure why that useful control of a comboBox appearance isn't available in AS3, but that will help avoid future confusion. Thanks.
Copy link to clipboard
Copied
you're welcome.