Results 1 to 3 of 3

Thread: What the best way to change zimlet panel item icon, name and tooltip dynamicly?

Hybrid View

  1. #1
    Join Date
    Apr 2013
    Posts
    33
    Rep Power
    0

    Default What the best way to change zimlet panel item icon, name and tooltip dynamicly?

    I need to change zimlet panel item icon its name and tooltip accordingly to application state.

    Are there related API functions?

  2. #2
    Join Date
    Apr 2013
    Posts
    33
    Rep Power
    0

    Default

    Hello,

    Currently as a hack I'm searching for html element by css class name and then changing its or related element property.

    For example to change zimlet panel item icon
    Code:
    $(".ImgTTZmPanelItemIcon").css("background","url('" + this.baseUrl + "img/" + icon + "') no-repeat 0 0");
    name
    Code:
    $(".ImgTTZmPanelItemIcon").parent().parent().find(".DwtTreeItem-Text").text(label);
    Though it seemed to work I didn't like this approach.

    But later I found that those properties are applied on current active application tab only.

    I'm still sure that there is more exquisite way to do that but I can't find what object type (probably a subclass of DwtComposite) and how to get it.

    Please help!
    Last edited by a1ex; 09-26-2013 at 10:31 PM.

  3. #3
    Join Date
    Apr 2013
    Posts
    33
    Rep Power
    0

    Default

    I'll rephrase the question: how to get DwtTreeItem object(s) of a zimlet panel item?

    I know it is possible by iterating all children and sub-children of DwtShell and filtering by object type, but it is too deep (5 levels or more) and there will be 5 or more instances of the same object type (related to each app/tab). All found items should be processed then.

    I think there should be better way.

Similar Threads

  1. Sample Zimlet that replace zimlet menu panel
    By xander2k in forum Zimlets
    Replies: 0
    Last Post: 06-18-2013, 09:53 AM
  2. Change Zimlet label in Panel via Javascript
    By hookmac123 in forum Zimlets
    Replies: 0
    Last Post: 01-25-2009, 12:09 AM
  3. Access zimlet panel item component and change label
    By bogdan.mocanu in forum Zimlets
    Replies: 0
    Last Post: 08-25-2008, 04:10 AM
  4. Change Zimlet Icon??
    By kirme3 in forum Zimlets
    Replies: 3
    Last Post: 01-09-2008, 08:10 AM
  5. Zimlet ICON
    By romulo in forum Administrators
    Replies: 0
    Last Post: 05-17-2007, 10:12 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •