mark/unmark checkbox Dynamics ax tree node on click
public int
mouseDown(int _x, int _y, int
_button, boolean _Ctrl, boolean _Shift)
{
ImageRes stateImage;
int idx,f;
int ret;
FormTreeItem formTreeItem ;
FormTreeItem parentNode;
#FormTreeControl
[idx,f] =
this.hitTest(_x,_y);
FormTreeItem = this.getItem(idx);
ret = super(_x, _y, _button, _Ctrl, _Shift);
if (FormTreeItem)
{
switch(formTreeItem.stateImage())
{
case
imageListAppl_checkbox.image(#ImageCheckNone):
stateImage
= imageListAppl_checkbox.image(#ImageCheckAll);
formTreeItem.stateImage(stateImage);
this.setItem(formTreeItem);
break;
case
imageListAppl_checkbox.image(#ImageCheckAll):
stateImage
= imageListAppl_checkbox.image(#ImageCheckNone);
formTreeItem.stateImage(stateImage);
this.setItem(formTreeItem);
break;
}
}
Return ret;
}
No comments:
Post a Comment