-
1. Re: resize combox dropdown
kglad Sep 9, 2012 9:57 AM (in response to joshww)show the code you tried and explain the reference to the movieclip parent and the combobox reference.
-
2. Re: resize combox dropdown
joshww Sep 9, 2012 10:19 AM (in response to kglad)code
function addComList ():void {
com_txt.addItem( { label: "com" } );
com_txt.addItem( { label: "net" } );
com_txt.addItem( { label: "org" } );
}
i using flash form components
the movieclip is called form2
-
3. Re: resize combox dropdown
kglad Sep 9, 2012 2:05 PM (in response to joshww)if the code you want to use to control your cb is in the same scope as addComList(), use
com_txt.width, com_txt.height
if the code is in the scope of the parent of form2, use:
form2.com_txt.width, form2.com_txt.height
-
4. Re: resize combox dropdown
joshww Sep 9, 2012 2:12 PM (in response to kglad)thanks
i think i am looking to set the font size.
-
5. Re: resize combox dropdown
kglad Sep 10, 2012 6:55 AM (in response to joshww)if you want to customize/format the text of the combobox, you can assign one (or more) textformat instances. for example:
var tfor:TextFormat = new TextFormat();
tfor.size = 8;
//if cb is your combobox instance:
cb.textField.setStyle("textFormat", tfor);
cb.setStyle("disabledTextFormat", tfor);
cb.dropdown.setRendererStyle("textFormat", tfor);
p.s. please mark helpful/correct responses.
-
6. Re: resize combox dropdown
joshww Sep 10, 2012 9:55 AM (in response to kglad)would you be so kind to explane how that code does what it does? i am trying to learn and i find the stuff on the web doesnt explane how or why, and i learn easiter knowing why/how.
-
-
8. Re: resize combox dropdown
kglad Sep 10, 2012 10:50 AM (in response to joshww)change the font size to suit your needs. i wasn't suggesting that size=8 was what you should use.
to learn more about styling a combobox (or other flash components): http://help.adobe.com/en_US/ActionScript/3.0_UsingComponentsAS3/WS5b3ccc516d4fbf351e63e3d1 18a9c65b32-7f5b.html
-
9. Re: resize combox dropdown
joshww Sep 10, 2012 11:04 AM (in response to kglad)size=8 works great in the dropdowns but when an item is picked it is too small
sorry to be a pest, thanks four your help
-
10. Re: resize combox dropdown
kglad Sep 10, 2012 11:45 AM (in response to joshww)then use a different size in the cb's textfield:
var tfor:TextFormat = new TextFormat();
tfor.size = 8;
//if cb is your combobox instance:
cb.setStyle("disabledTextFormat", tfor);
cb.dropdown.setRendererStyle("textFormat", tfor);
tfor.size=12;
cb.textField.setStyle("textFormat", tfor); -
11. Re: resize combox dropdown
joshww Sep 10, 2012 1:07 PM (in response to kglad)sorry for bothering you. what am doindg wrong? nothing is changing
import fl.controls.ComboBox;
import flash.text.TextField;
import flash.text.TextFieldType;
// custom function we create to populate the comboBox list
// create a new textformat and set the style of it
var tfor:TextFormat = new TextFormat();
com_txt.setStyle("disabledTextFormat", tfor);
com_txt.dropdown.setRendererStyle("textFormat", tfor);
tfor.size=11;
com_txt.textField.setStyle("textFormat", tfor);
com_txt.dropdownWidth = 40;
com_txt.dropdown.rowHeight = 10;
function addComList ():void {
com_txt.addItem( { label: "" } );
com_txt.addItem( { label: "com" } );
com_txt.addItem( { label: "net" } );
com_txt.addItem( { label: "org" } );
-
12. Re: resize combox dropdown
kglad Sep 10, 2012 1:33 PM (in response to joshww)looks like you have to use a different textformat instance for each:
import fl.controls.ComboBox;
import flash.text.TextField;
import flash.text.TextFieldType;
// custom function we create to populate the comboBox list
// create a new textformat and set the style of it
var tfor1:TextFormat = new TextFormat();
com_txt.setStyle("disabledTextFormat", tfor1);
com_txt.dropdown.setRendererStyle("textFormat", tfor1);
var tfor:TextFormat = new TextFormat();
tfor.size=11;
com_txt.textField.setStyle("textFormat", tfor);
com_txt.dropdownWidth = 40;
com_txt.dropdown.rowHeight = 10;
function addComList ():void {
com_txt.addItem( { label: "" } );
com_txt.addItem( { label: "com" } );
com_txt.addItem( { label: "net" } );
com_txt.addItem( { label: "org" } );
-
-
-
15. Re: resize combox dropdown
joshww Sep 11, 2012 7:37 AM (in response to kglad)where can i learn as3?
my dropdown is to far down from the rest, why me? the issues started when i made my flash full browser. i relize i had to scale everything dwon in flah so it will look right in the browser, everything scaled down easily accpet the combox
-
16. Re: resize combox dropdown
kglad Sep 11, 2012 8:09 AM (in response to joshww)there are a number of ways to learn as3. some people learn best using a book and some via trial and error.
but i think the most helpful way to learn is to start by learning how to use the adobe help files. especially, the listing of all classes, properties, methods and events. learning how to use it (you don't need to learn or memorize it), combined with trial and error (or testing in flash) is what works best for me.
-
17. Re: resize combox dropdown
joshww Sep 11, 2012 8:30 AM (in response to kglad)any way to move the dropdown? its too low.
-
18. Re: resize combox dropdown
kglad Sep 11, 2012 9:31 AM (in response to joshww)you can use its x and y properties to change where it appears on stage:
com_txt.y -= 200; // will move it up 200 pixels



