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.

How to add custom Context menu to treview in the Dialog

Anonymous
Not applicable
Please help me to understand what I have to do to create own custom context menu on TreeView instead of "What's this?".

The problem is :
I didn't find solution in case of dialog with treeview created from GRC file. Also anoter problem ... unable to associate treeview from GRC with TreeView C++ class.
I am new in this community so plz explain me correct solution or help with working small example
Thanks
1 REPLY 1
Akos Somorjai
Graphisoft
Graphisoft
Take a look at the Navigator_Test example, that contains a TreeView.

To use the C++ interface:
class MyDial : public TreeViewObserver, ... {
protected:
DG::TreeView mTree;

}
In the dialog's constructor
MyDial ()
: mTree (dialId, grcItemId), ...
{
    mTree.SetHelpStyle (DG::TreeView::HSForItem);
}

And you'll have to implement the
ItemHelpRequested
callback.

Best,

Akos