We value your input! Please participate in Archicad 28 Home Screen and Tooltips/Quick Tutorials survey
2022-11-15 01:42 PM
As I see, for Dialog Manager, the tooltip string for any dialog element seems to be readonly, there is no DGSetItemTooltipString. (While, interestingly, in the GDL world, it's a widely used commonplace to manipulate a GDL object's UI element's tooltip to any custom value.)
Isn't there a way to set a tooltip for a custom (non GRC-defined) string?
2022-11-15 05:54 PM
See
ItemObserver::ItemToolTipRequested (const ItemHelpEvent& ev, GS::UniString* toolTipText);
Or
PanelObserver::PanelToolTipRequested (const PanelHelpEvent& ev, GS::UniString* toolTipText);
Like this
class TabSettingLabelMain
: private DG::UserItemObserver
{
private:
virtual void ItemToolTipRequested (const DG::ItemHelpEvent& ev, GS::UniString* toolTipText);
private:
DG::UserItem mi_image_preview;
};
TabSettingLabelMain::TabSettingLabelMain( )
: mi_image_preview( GetReference(), IMAGE_PREVIEW )
{
mi_image_preview.Attach(*this);
}
void TabSettingLabelMain::ItemToolTipRequested(const DG::ItemHelpEvent& ev, GS::UniString* toolTipText)
{
if ( ev.GetSource() == &mi_image_preview )
{
*toolTipText = str::CvtUni( m_block->image_path );
}
}
2022-11-16 09:38 AM
Cool, thanks, I'll give it a check today or tomorrow.