I have the following code which gives me an error. I want to add the width property programmatically and in %:
firstcombo.width = 90%;
But that gives me the following err开发者_JAVA百科or:
- 1084 syntax error expecting rightparen before colon
What is the correct syntax?
Try:
firstcombo.percentWidth = 90;
The width combobox property is a Number. you need to set it accordingly. Something like firstCombo.width = .9 * X where X is the value you want 90% of.
精彩评论