web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

How to add icon to form tree control?

(0) ShareShare
ReportReport
Posted on by 932

Hi,

I add tree control in form:

I want to add icons for this tree :

in the init mey=thod of form I set this code:

 ImageListAppl imageListAppl;

imageListAppl = new ImageListAppl( 32, 32 );

imageListAppl.add(10565);
imageListAppl.add(12265);
imageListAppl.add(10901);
imageListAppl.addOverlay(10565);
imageListAppl.addOverlay(12265);
imageListAppl.addOverlay(10901);

EUKDelegue::buildTree(Tree,imageListAppl.image(10565), name);

But I didn't get any icons

What is the problem?

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    Rustem Galiamov Profile Picture
    8,072 on at

    Hi BASMA!

    You could define an image for a tree node (FormTreeItem object) of a tree control (FormTreeControl object) on a form. Then the image would be displayed as an icon for the tree node.

  • Suggested answer
    Rustem Galiamov Profile Picture
    8,072 on at

    Take a look at this link also:

    community.dynamics.com/.../how-to-use-a-formtreecontrol

  • BASMA Profile Picture
    932 on at

    Hi Rustem.

    Thanks for reply but how can I  define an image goe tree node?

  • Suggested answer
    Rustem Galiamov Profile Picture
    8,072 on at

    Go through the link from my second suggestion.

  • Blue Wang Profile Picture
    on at

    Hi Basma,

    In Dynamic AX 2012 , we could define an image for a tree node (FormTreeItem) of a tree control (FormTreeControl) on a form.

    Then the image would be displayed as an icon for the tree node.

    Rustem's shared article explains in detail.


    fTreeItem = FormTreeControl.getItem(FormTreeControl.getSelection());

    fTreeItem .Image(1);

    FormTreeControl.setItem(fTreeItem );


    I hope it will help you.

  • BASMA Profile Picture
    932 on at

    I created a method buildTree on the table :

    public static void buildTree( FormTreeControl _tree,ImageRes _imageListAppl, str60 _delgueName )

    {

     EUKDelegue         _eukDelegue;

     EUKRoleDelegue     _eukRoleDelegue;

    select DelegueName, RecId

             from _eukDelegue where _eukDelegue.DelegueName==_delgueName;

        select recId from _eukRoleDelegue  where _eukRoleDelegue.DelegueRef == _eukDelegue.RecId;

       _tree.addItem( 0, 0, new FormTreeItem( _eukDelegue.DelegueName,_imageListAppl, _eukRoleDelegue.RecId, _eukDelegue.RecId ) );

    }

    But I didn't get any icone

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
Martin Dráb Profile Picture

Martin Dráb 4 Most Valuable Professional

#1
Priya_K Profile Picture

Priya_K 4

#3
MyDynamicsNAV Profile Picture

MyDynamicsNAV 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans