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 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
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.
Go through the link from my second suggestion.
Hi Rustem.
Thanks for reply but how can I define an image goe tree node?
Take a look at this link also:
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.
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal... 291,240 Super User 2024 Season 2
Martin Dráb 230,149 Most Valuable Professional
nmaenpaa 101,156