0

Background color of widget

Is it possible to change the background color of the widget?

by
7 Replies
  • Fullscreen is the only deviation that can be made from the main widget skins, as I believe.
    0
  • I did this by creating an image of the background color, and just adding that to the widget view before anything else:

    // background
    new KONtx.element.Image({
    src: $tendril.styles.images.common.background_image,
    styles: $tendril.styles.common.background_image,
    }).appendTo(this);

    where styles has 0,0 as h/v offsets and width and height defined to take up the entire area of the view.
    0
  • Views themselves are also style-aware, and can have styles like background images applied to them.

    Do not apply dimensions or offsets to views!

    CODE
    var MyViewClass = new KONtx.Class({

    Extends: KONtx.system.SidebarView,

    createView: function () {

    this.setStyles({
    backgroundColor: 'red'
    });

    },

    updateView: function () {
    //
    }

    });
    0
  • QUOTE (keville @ Jun 24 2009, 05:08 PM) <{POST_SNAPBACK}>
    Views themselves are also style-aware, and can have styles like background images applied to them.

    Do not apply dimensions or offsets to views!

    CODE
    var MyViewClass = new KONtx.Class({

    Extends: KONtx.system.SidebarView,

    createView: function () {

    this.setStyles({
    backgroundColor: 'red'
    });

    },

    updateView: function () {
    //
    }

    });

    This code works properly in a simulator but doesn't work on my Samsung LE32B650. I see just a black screen.

    Yahoo! Widget Engine: 5.0.0
    Widget Application Framework: 1.3.12.C
    0
  • Thanks Peter and keville, is there a way to change the outer frame color also(which is currently black)?
    0
  • I am pretty sure any changes to the sideBar main appearance will result in immediate rejection of the widget, as the display standard for the views is a requirement for acceptance.

    It has been discussed in quite a few other topics. :)
    0
  • Hi Jaya,

    Please use [yourImage].setStyle('backgroundColor', 'black'), I think that you are needing this thing.

    Thanks,
    Hoa Tat.
    0
  • QUOTE (WidgetRealm @ Jun 25 2009, 11:22 AM) <{POST_SNAPBACK}>
    I am pretty sure any changes to the sideBar main appearance will result in immediate rejection of the widget, as the display standard for the views is a requirement for acceptance.

    It has been discussed in quite a few other topics. :)-Jeremy
    0
  • Thank you all for clarifying :)
    0

Recent Posts

in Design / Interaction - Yahoo! TV Widgets