Archicad C++ API
About Archicad add-on development using the C++ API.
SOLVED!

DG::PopUp.SetSize() and DG::PopUp.SetRect() not working on Win11

ReignBough
Enthusiast

We have an add-on with a DG::PopUp that works on Win10 below using SetSize() and SetRect(). But when we use the add-on on a Win11, the popup did not show.

 

I tried modifying the code using SetPosition(), SetWidth(), and SetHeight() instead, and the popup did show.

 

Is this a bug or there is a new way to call SetSize() and SetRect() for DG::PopUp?

 

BTW, for other DG items that we used, the SetSize() and SetRect() are working fine. But we are not sure if this is the case for all of DG items.

 

EDIT (2023-Jun-26):

Apparently, the content of the DG::PopUp is also bugged. When clicking on the item, the list contains nothing but blanks. A lot of blanks.

~ReignBough~
ARCHICAD 26 INT (from AC18)
Windows 11 Pro, AMD Ryzen 7, 3.20GHz, 32.0GB RAM, 64-bit OS
1 ACCEPTED SOLUTION

Accepted Solutions
Solution
ReignBough
Enthusiast

Found it. When we are creating pop-up/combo item, the DG::Rect() is void:

PopUpFoo (GetReference(), DG::Rect(), POPUP_VSIZE, POPUP_TEXTOFFSET)

 

It should have been initialized with values:

PopUpFoo (GetReference(), DG::Rect(XPOS, YPOS, XPOS + POPUP_WIDTH, YPOS + POPUP_HEIGHT), POPUP_VSIZE, POPUP_TEXTOFFSET)
~ReignBough~
ARCHICAD 26 INT (from AC18)
Windows 11 Pro, AMD Ryzen 7, 3.20GHz, 32.0GB RAM, 64-bit OS

View solution in original post

1 REPLY 1
Solution
ReignBough
Enthusiast

Found it. When we are creating pop-up/combo item, the DG::Rect() is void:

PopUpFoo (GetReference(), DG::Rect(), POPUP_VSIZE, POPUP_TEXTOFFSET)

 

It should have been initialized with values:

PopUpFoo (GetReference(), DG::Rect(XPOS, YPOS, XPOS + POPUP_WIDTH, YPOS + POPUP_HEIGHT), POPUP_VSIZE, POPUP_TEXTOFFSET)
~ReignBough~
ARCHICAD 26 INT (from AC18)
Windows 11 Pro, AMD Ryzen 7, 3.20GHz, 32.0GB RAM, 64-bit OS