3.2.0

get style for UI.Button !

I'm unable to get (read) the "width" style property for the UI.Button widget.
'width' is initially set by style sheet as (example): #myButton {position: absolute; left: 10px; top: 20px; width: 50px;}

Reading the style using myButton.getStyle('width'); returns 'undefined' instead of 50 !!! after I set the new style with myButton.setSize(100) the new getStyle returns correctly (100)!

In conclusion I seem unable to read a style coming from the style sheet settings but works fine if it is programatically changed.
Why this behaviour?
Thanks!
guest.marc
August 16,
Similar behaviour for UI.Group! how do I get 'width' or 'height' for a group element?
guest.marc
August 16,

This topic is archived.

See also:


Back to support forum