开发者

add % value programmatically

开发者 https://www.devze.com 2022-12-17 05:01 出处:网络
I have the following code which gives me an error. I want to add the width property programmatically and in %:

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号