We value your input!
Please participate in Archicad 28 Home Screen and Tooltips/Quick Tutorials survey

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

Dynamic text on a Modeless Palette?

Csanyi Bence
Contributor

Hi there,

 

i was thinking if this is possible? I successfully invoked a floating palette (modeless palette) and placed some placeholder texts on it (see image). Is it possible, if i am selecting a placed object (GDL object), to write the parameters of the object on the palette? For example: number of selections, guids, typeID s etc..

 

Thanks in advance!

 

 


floating_palette.jpg
1 ACCEPTED SOLUTION

Accepted Solutions
Solution

Yes this should be possible. I assume you are using a Static Text Item correct?
Depending on whether you use the C++ or C style Dialog Items, one of the following should work.

 

// C++ Style
DG::StaticText yourTextItem (panelReference, yourTextItemID),
yourTextItem.SetText ("New text");

// C Style
DGSetItemText (dialogID, yourTextItemID, "New text");

 

 

Edit: Minor fix in code example

View solution in original post

2 REPLIES 2
Solution

Yes this should be possible. I assume you are using a Static Text Item correct?
Depending on whether you use the C++ or C style Dialog Items, one of the following should work.

 

// C++ Style
DG::StaticText yourTextItem (panelReference, yourTextItemID),
yourTextItem.SetText ("New text");

// C Style
DGSetItemText (dialogID, yourTextItemID, "New text");

 

 

Edit: Minor fix in code example

Csanyi Bence
Contributor

thanks a lot! it's working!