1
votes

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 error:

  • 1084 syntax error expecting rightparen before colon

What is the correct syntax?

2

2 Answers

3
votes

Try:

firstcombo.percentWidth = 90;
0
votes

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.