We value your input! Please participate in Archicad 28 Home Screen and Tooltips/Quick Tutorials survey
2021-10-01 01:43 AM
Hi
I'm trying to remove the gap between the normal-icon and the arrow(collapse/expand) icon of a treeView item. If I don't set the state-icon, there appears a blank space creating a gap. I tried setting a state-icon and then setting its size to zero, but that did not help.
treeView.SetItemStateIcon(treeItemIndex, DG::Icon (ACAPI_GetOwnResModule(), (short) DashIconId));
treeView.SetStateIconSize(0, 0); // omit state icon by setting its size to zero
How can I avoid the state-icon and get rid of that blank space?
Thanks.
Solved! Go to Solution.
2021-10-05 09:17 AM
Please try to set the icon sizes in the grc file like so:
SingleSelTreeView 10 10 100 100 LargePlain 18 18 0 0 noLabelEdit noDragDrop 0.
Here 18 18 are the normal icon sizes and 0 0 are state icon sizes.
2021-10-04 03:43 PM
Hi try to set the empty icon as the state icon of the treeview control.
treeView.SetItemStateIcon(treeItemIndex, DG::Icon ());
treeView.SetStateIconSize(0, 0);
DG::Icon has an empty constructor that sets the iconId to DG_NO_ICON.
2021-10-04 04:10 PM
@Miklos Vegh That did not help.. No change.. The same gap appears.
2021-10-05 09:17 AM
Please try to set the icon sizes in the grc file like so:
SingleSelTreeView 10 10 100 100 LargePlain 18 18 0 0 noLabelEdit noDragDrop 0.
Here 18 18 are the normal icon sizes and 0 0 are state icon sizes.
2021-10-05 09:22 AM
Yes, that worked! 🙂
Thanks a lot!