Friday - last edited Monday
Hi all,
I am porting some legacy Archicad 9 code to Archicad 28/29. In the old code, we used IconMenuCheck like this:
/*\[ 5 ]*/ IconMenuCheck 0 96 33 22 32168 32274 32283 32314 case WETAREAPALETTE: switch (DGPushMenuGetItemIconId(dialID, item, DGPushMenuGetSelected(dialID, item))) { case ); DGSetItemValLong(dialID, item, 0); break;
This worked well because the selected face of the IconMenuCheck effectively became a new clickable button.
In Archicad 28/29:
IconMenuCheck still works for showing the popup, but I can’t find a way to retrieve which specific icon was clicked. I only get 0 or 1 (clicked or not).
I was advised to replace it with:
/*\[ 76 ]*/ UserControl 60 140 50 40 258 1 4 0 2 GICN_BathMenu
This shows the popup menu, but the face itself is not clickable. The face changes, but does not behave as a button like before.
Question:
How can I replicate the old IconMenuCheck behavior in Archicad 28/29 — where the changed face itself becomes the active button with its own functionality, not just a passive display?
Any tips, examples, or replacement patterns would be much appreciated!
Thanks in advance.
The new button below
The old buttons below
Friday
any one
UserControl is a generic custom control area – it can display dynamic content (e.g. an icon that updates), but it doesn’t inherently handle user interaction (clicks) unless you implement it via callbacks or observers.
so how can implement something like IconMenuCheck that could display dynamic content (e.g. an icon that updates) and also was clickable. please any one help i am stuck with these for weeks?
yesterday
Hi, this control still exist in Dialog Manager.
You can use the
IconMenuCheck 0 96 33 22 32168 32274 32283 32314
as earlier.
Although it is straightforward to use the C++ API of DG instead of the C API, the C API can still be used as follows: