Can I add tool-tip to a property?

Can I add a tool-tip to the component’s newly created properties same as below?

Hi you can check from wizards. This one is an example code also.


pname = servo.Name + ':' + j.Name + ' Open'
localize.execute('SetLocalizationCommand', 'English', 'Python', 'IO_ControlsWizard.' + pname, 'Description', 'Value when closed (driven to this value when signaled False)')
prop = createProperty(VC_REAL, pname)


For Python commands/add-ons, yes. For a component property, as far as I know the answer is currently no. What you can do, however, is create a Note behavior and then document what the property is used for.


Similar to Ozan answer. You can include a python script behavior to your component in order to include the tooltip:

from vcScript import *
app = getApplication()
localize = app.findCommand(“netCommand”)
localize.execute(“SetLocalizationCommand”, “English”, “ComponentWrapper”, “ShowArrows”, “Description”, “Any description you want goes here”)

This way your components (even if you share them with someone) will have the tooltip in those properties you want. Just remember that the tooltip will be shown for ANY component that has the same property name.

Another way to add localization for component properties (including its tooltip) is by using a resource file.

Please search in the API documentation for “Creating a Python Add-on”, go to “Step 4. Localize using XAML File (optional)”. In your xaml file you can add something like this:

<s:String x:Key=“ComboKey::ComponentWrapper.ShowArrows.Name”>Show arrows</s:String>
<s:String x:Key=“ComboKey::ComponentWrapper.ShowArrows.Description”>Show arrows description</s:String>

That localization (tootip is the Description) will be added to ANY component that has a property called “ShowArrows”.

However, you will need to distribute your add-on with the xaml file to the people you send those components, otherwise they wont get the tooltip description.

Thank you all so much for your support!

Hello Camilo,

what is the quickest way to activate Snap tool in .net command from python?