0

Company Logos in the DOCK

Hello,

Can we add logo's or some other images along with the text in the snippets.
If we have multiple snippets can i add different images next to text.

Thanks
Harsha

by
3 Replies
  • QUOTE (harsha s @ Jan 19 2010, 11:02 PM) <{POST_SNAPBACK}>
    Hello,

    Can we add logo's or some other images along with the text in the snippets.
    If we have multiple snippets can i add different images next to text.

    Thanks
    Harsha

    Yes, you can add images just like you would add text.

    CODE
    var StaticSnippetView = new KONtx.Class({
    ClassName: 'StaticSnippetView',

    // Pay attention to the fact this one extends from AnchorSnippetView
    // That is because this snippet always exists in all profiles and
    // isn't a "custom" one added per user action
    Extends: KONtx.system.AnchorSnippetView,
    createView: function() {

    // ADDING IMAGE
    this.controls.img = new KONtx.element.Image({
    src : imgSrc,
    styles: {
    vAlign: "center",
    hAlign: "center"
    },
    }).appendTo(this);
    }
    });
    0
  • Great Example.

    As noted in the code section, the above will create Anchor Snippets. To create "custom" Snippets, you need to use the ProfileSnippetView Class.
    CODE
    //Anchor Snippets
    Extends: KONtx.system.AnchorSnippetView,
    //Profile Snippets
    Extends: KONtx.system.ProfileSnippetView,


    The pros and cons of ProfileSnippetView's
    Pros
    - They do not carry between device user profiles.
    - They can easily be removed and then replaced using KONtx.application.setProfileSnippetViews([Array_of_snippet_Confs]);
    Cons
    - They do not care between device user profiles.

    Hope this helps you work with Snippets!
    0
  • Thanks Guys...

    Already got the solution
    0

Recent Posts

in Design / Interaction - Yahoo! TV Widgets