0

Change styles in updateView

Hi, I'm new here.

I have this code in createView:

CODE
this.controls.txttitulo = new KONtx.element.Text({
label: '',
wrap:true,
styles:{
color:'#ffffff',
fontSize: KONtx.utility.scale(18),
width:this.width,
}
}).appendTo(this);


How can I change any style (color, fontSize, ...) from updateView ?

An example is a news widget: in the createView I have the code I posted with a fontSize of 18. In the updateView I get the title of the new from a rss channel, but the title is too long and I want to decrease the fontSize. Is that possible? any idea?

THANKS.

by
2 Replies
  • Check out setStyle() or setStyles() - not sure which one it is, but it will allow you to pass in a object with the new style information.
    0
  • Thanks WidgetRealm, it works fine, this is the right way:

    CODE
    this.controls.txttitulo.setStyles({
    width:40,
    fontSize:18,
    });
    0

Recent Posts

in Design / Interaction - Yahoo! TV Widgets