You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@pivot.apache.org by Pivot-Steven Dahlin <pi...@gmail.com> on 2010/02/18 03:49:23 UTC
setting width of a component
I cannot seem to set the width of a component such as TextInput. They are
all the same width and their is still room in the row and column. Could
anyone tell me the way to define the width that will be displayed for such
components?
Thanks
Re: setting width of a component
Posted by Greg Brown <gk...@mac.com>.
Many Pivot applications rely on automatic layout management for sizing components. If you have not already done so, you may find it helpful to read through the sections of the tutorial that discuss layout. I would suggest reading the first few sections (through "Component & Container") and then the section on "Layout Containers":
http://pivot.apache.org/tutorials/platform-overview.html
http://pivot.apache.org/tutorials/layout-containers.html
G
On Feb 17, 2010, at 9:49 PM, Pivot-Steven Dahlin wrote:
> I cannot seem to set the width of a component such as TextInput. They are all the same width and their is still room in the row and column. Could anyone tell me the way to define the width that will be displayed for such components?
>
> Thanks
Re: setting width of a component
Posted by Todd Volkert <tv...@gmail.com>.
Hi Steven,
For all components, you can set an explicit preferred width in pixels using
setPreferredWidth() (or preferredWidth="" in WTKX) -- this will override any
calculations that the component would otherwise perform. Or for TextInput
specifically, you can set its textSize property (setTextSize() in Java or
textSize="" in WTKX), which tells it how to calculate its preferred width
based on how many characters you want it to be able to show without
scrolling.
Cheers,
-T
On Wed, Feb 17, 2010 at 9:49 PM, Pivot-Steven Dahlin <
pivot.sdahlin@gmail.com> wrote:
> I cannot seem to set the width of a component such as TextInput. They are
> all the same width and their is still room in the row and column. Could
> anyone tell me the way to define the width that will be displayed for such
> components?
>
> Thanks
>