getting a widget's width

View: New views
3 Messages — Rating Filter:   Alert me  

getting a widget's width

by frederic_viollet :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi Cyril,

is there a function that would allow me to get the width of a widget?
Let's say that I have a checkBox : "myCheckBox". Can I use
myCheckBox.getWidth() function (at the moment, it seems that the
answer is no)? Or do I have to get the width through the
myCheckBox.divExt.offsetWidth attribute?

Thanks

Fred


Re: getting a widget's width

by Cyril Balit :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hello Fred,

The getWidth method return the width property of a component as it has
been set or change using a set width. To get the real style width you
have to use the getOffsetWidth method.

Cyril

--- In rialto-dev@..., "frederic_viollet"
<frederic.viollet@...> wrote:

>
> Hi Cyril,
>
> is there a function that would allow me to get the width of a widget?
> Let's say that I have a checkBox : "myCheckBox". Can I use
> myCheckBox.getWidth() function (at the moment, it seems that the
> answer is no)? Or do I have to get the width through the
> myCheckBox.divExt.offsetWidth attribute?
>
> Thanks
>
> Fred
>



Re: getting a widget's width

by frederic_viollet :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Ok great.

Thanks Cyril.

Fred

--- In rialto-dev@..., "Cyril Balit" <cbalit@...> wrote:

>
> Hello Fred,
>
> The getWidth method return the width property of a component as it has
> been set or change using a set width. To get the real style width you
> have to use the getOffsetWidth method.
>
> Cyril
>
> --- In rialto-dev@..., "frederic_viollet"
> <frederic.viollet@> wrote:
> >
> > Hi Cyril,
> >
> > is there a function that would allow me to get the width of a widget?
> > Let's say that I have a checkBox : "myCheckBox". Can I use
> > myCheckBox.getWidth() function (at the moment, it seems that the
> > answer is no)? Or do I have to get the width through the
> > myCheckBox.divExt.offsetWidth attribute?
> >
> > Thanks
> >
> > Fred
> >
>


LightInTheBox - Buy quality products at wholesale price