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

Help needed: How to display a constantly changing variable value on a palette?

A101
Participant

Hi,

 

through the answers and information on this forum, I managed to create a floating palette that has static elements on it as; icon, textbox, etc But I'm not able to to assign a variable i.e. (Unistring) to it i.e. (LeftText), in order to display an internal value. The value shows up if I use an Alert window or an Information alert window, so I'm confident it works, but not in the palette. I've tried assigning it throught the .grc file, but honestly I'm not sure if it is the right place for it.

 

so my question is as I'm not getting the GUI structure here, how could I display any internal variable value (doesn't really matter which) of an element on a floating/ dockable palette? 

 

Thank you 

1 REPLY 1

Hi,

 

You need to represent the text field somehow in code. It depends a bit on how you set the palette up. I'm assuming you are doing it C++ style (DG::Palette). Then you could have a member of the palette of type DG::LeftText. This member variable then has methods to change the text.
Check out the examples "Navigator_Test", "FormatRegisterText", CurtainWall_Drawer &  "AddOnObject_Manager_ReserveInterface". These examples have dialogs with such LeftText items.

Bernd Schwarzenbacher - Archicad Add-On Developer - Get Add-Ons & Archicad Tips on my Website: bschwb.com