Omid Gharib
Omid Gharib

Reputation: 321

How is it possible that set size(both width and height) to the component in Codename one designer?

I got a problem in codenameone designer, I cant find anything related to the sizing component. I want to set size components in codenameone designer not implementing in the codes. Thanks in advance

Upvotes: 0

Views: 147

Answers (1)

Shai Almog
Shai Almog

Reputation: 52760

This is the wrong way to look at this, you should not set size but instead trigger size which depends on your component type and your intentions. E.g. for text components set the columns/rows, for lists/combo boxes set the rendering prototype. You can also manipulate padding/margin/border/layout etc. to manipulate whitespace.

If you insist you can always bind a before*Show event and invoke setPreferredSize on the component.

Upvotes: 1

Related Questions