0

Extending KONtx.element - Custom theme

I have read a few topics in the forum regarding "removing grid lines from grid" and "custom elements". I have seen code where a KONtx.element class is extended and a custom element is created. I have also read that while creating custom elements, we must set the theme of the element. Where can I get more information on editing the theme of an element? I haven't found any information in the Developer guide.

by
3 Replies
  • QUOTE (Icarus @ Mar 8 2010, 01:41 AM) <{POST_SNAPBACK}>
    I have read a few topics in the forum regarding "removing grid lines from grid" and "custom elements". I have seen code where a KONtx.element class is extended and a custom element is created. I have also read that while creating custom elements, we must set the theme of the element. Where can I get more information on editing the theme of an element? I haven't found any information in the Developer guide.

    That's because there isn't any information in the dev guide. :)~/TVWidgets/Konfabulator-Samsung-1.2/data/Overlay/Script/Framework/Themes/themes.js
    0
  • QUOTE (Steve @ Mar 11 2010, 11:54 AM) <{POST_SNAPBACK}>
    That's because there isn't any information in the dev guide. :)Thank you, Steve. Do you know where the renderSkin() method is defined?
    0
  • QUOTE (Icarus @ Mar 11 2010, 07:53 PM) <{POST_SNAPBACK}>
    Thank you, Steve. Do you know where the renderSkin() method is defined?

    That would be defined in the theme. Below is a skeleton structure of how I overrode the Tab Button theme with my own renderSkin:

    CODE
    Theme.storage.alias('BlackAngleTabStripButton', 'ControlTabStripButton');
    Theme.storage.add('BlackAngleTabStripButton', $merge(Theme.storage
    .get('ControlTabStripButton'), {
    renderSkin : function(state, w, h, args, theme) {

    }
    })


    Or if your creating a new theme, you can do something like this:

    CODE
    Theme.storage.add('DataScroller', {
    renderSkin : function(state, w, h, args, theme) {
    }
    })


    Look in the theme.js file that I mentioned to get the hang of using themes.
    0

Recent Posts

in Design / Interaction - Yahoo! TV Widgets