Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    Add ImageButton to Treegrid Problem

    Hi..
    Iam using TreeGrid. I have only one column like Name in TreeGrid. i added user icons
    Using below code.
    treeGrid.setNodeIcon("/images/Group_Menu.png");
    treeGrid.setFolderIcon("/images/Group_Menu.png");

    Before the user icons and after the "+ or -" symbols i want to add one more image button with handler.
    Is there any possibility to achieve this.
    Please find the below ScreenShot.
    Attached Files

    #2
    You can put an icon there via the extraIcon feature by setting TreeNode.extraIcon. In 3.1d builds there's an API treeGrid.isOverExtraIcon() to check if a mouse event is over the extra icon so you can make it interactive.

    Comment


      #3
      Using 3.1d-2012-10-30, I do not see an extraIcon field in the TreeNode class.

      I tried this with no luck:
      Code:
      final String iconUrl = "/favicon.ico";
      treeNode.setAttribute ("extraIcon", iconUrl);
      And also this with no luck:
      Code:
      final String iconUrl = "/favicon.ico";
      final String iconHtml = Canvas.imgHTML (iconUrl);
      treeNode.setAttribute ("extraIcon", iconHtml);
      How can this be done?

      Also, is this limited to a single icon?

      Comment

      Working...
      X