GetObjectInfo - Forum

Forum Navigation
You need to log in to create posts and topics.

GetObjectInfo

Hello

I want to know the name of icon attached to an object. I have tried GetObjectInfo "PushButton16" "icon" [icoName] but [icoName] is undefined ?

Is it a bug ? Is there another method ?

@phil78 what kind of object? How is the icon attached to it?

Hi @luishp I have tried with a pushbutton with glyphicon-heart defined in properties and also with svg svgBlob1.

I've also noticed that attaching a tooltip to an svg causes a crash ?

 

@phil78 icons on buttons are just injected HTML, in your case something like this:

<span style="font-size:;" class="glyphicon glyphicon-heart"></span>

You can get this code by using GetObjectHTML:

GetObjectHTML "PushButton1" [result]

SVG icons contain the full SVG image code, not just the icon name.
Why do you want it exactly?

ve also noticed that attaching a tooltip to an svg causes a crash ?

How are you attaching the tooltip?

Regards.

Hi @luishp 

My aim is to display the name of the svg or icon in a tooltip or in an external field.

I attach the tooltip using cust-attr: title = "name" or the asmatooltip or memtooltip plug-ins.

Here's my test. Note that I have no crashes in this test.

Regards

Uploaded files:
  • You need to login to have access to uploads.

@phil78 not sure about the problems you are facing with the tooltips plugins but keep in mind that many plugins are designed to work over Containers.
So, if you place the SVG icon inside a Container object and you attach the tooltip to the Container insted of the icon, probably the problem will disappear, while the behaviour is almost the same.

Regards.