Sorry, it was getPreferredBoxWidth()
alex.d wrote:
>
> Hi,
>
> It works, really???
> Following code :
> var label = new qx.ui.basic.Label("Hi I'm a label");
> alert(label.getPreferredWidth());
> causes folowing Error:
> label.getPreferredWidth is not a function
> What's your secret? ;-)
>
> Regards
> alex.d
>> Thanks Sebastian once more,
>>
>> It works. :-)
>>
>> var label = new qx.ui.basic.Label('Hi I'm a label');
>> alert(label.getPreferredWidth());
>>
>> It serves for knowing the width needed for the header of a column (so
>> that
>> it isn't clipped), or if I know the data cells have numbers of at most 5
>> digits, I can calculate the width in this way:
>>
>> requiredColunmWidth=Math.max(new qx.ui.basic.Label('Column
>> title').getPreferredWidth(), new
>> qx.ui.basic.Label('0000')..getPreferredWidth())
>>
>> Do you see?
>> I try as much as possible assigning pixels to dimensions, because
>> everything
>> I do is dynamic.
>>
>>
>>
>> Sebastian Werner wrote:
>>
>>> Hi David!
>>>
>>> No there is no way. In my opinion it's generally not a good idea to do
>>> such auto-calculations inside a long table.
>>>
>>> Maybe this is possible with the new layouter. Mhh, what you can do yes,
>>> and what you maybe mean, is, which is the preferred size of a label.
>>> This should be no problem using myLabel.getPreferredWidth(). But I
>>> haven't tried it myself yet.
>>>
>>>
>>
>>
>
>
> -------------------------------------------------------------------------
> Using Tomcat but need to do more? Need to support web services, security?
> Get stuff done quickly with pre-integrated technology to make your job
> easier
> Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
> _______________________________________________
> qooxdoo-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
>
>
--
View this message in context:
http://www.nabble.com/ComboBox-%22auto%22-width--tf2157707.html#a5962311
Sent from the qooxdoo-devel forum at Nabble.com.
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel