Using image as program node title

Hi everybody,

I noticed that the program title displayed in the command window of the program node is “inserted” in the HTML by Polyscope even without having any placeholder tag in the program node HTML file, using the value returned by Get Title.
I want to use an image instead of plain text as a title, but if I set the return value of getTitle to an empty string to save that space, the button to create a new node also gets empty:

image

Is there a way to remove the title and replace it with a label with an image, but without erasing the button name?

Thanks in advance!

2 Likes

I’ve already noticed that, and I’d like that the URCap title is not added in the Program Node view automatically.

At the moment I’ve set it as an empty string, but it is a bit painful when you have several empty-titled URCap and you need to chose the right one.

Alessandro Tondo @qbrobotics

This worked for me, in the getTitle() of the ProgramNodeService add this:
String myLogo = getClass().getResource("/com/ur/urcap/my_urcap/impl/my_logo_image.png").toString();
return "<html><table cellpadding=0><tr><td><img src='" + myLogo + "'></td></tr></table></html>";

5 Likes

Cool, thanks @r4p! Worked for me too :slight_smile:
I had to adjust the image a bit so as to fit the button. I think it’s acceptable, although it would be great to be able to adjust the sizes for the button and the title independently… maybe this could be a feature request?

1 Like

Great :grinning:
Yes I think that adding a feature request could lead to a more complete version of this functionality.

It would be great if the logo could be automatically resized for the URCap button, since we are using a large image in the Program Node view.

1 Like

Is it possible to use one image for the button, and another for the title inside the cap?

Generally, UR would like to refer to using a String as a title for various nodes, both in Installation and Program.
This is the same behavior as any other node in PolyScope, and UR would encourage, that URCap nodes mimic the same look and feel as other PolyScope nodes.

Note that Toolbars in e-Series by default must supply a logo / icon for selecting their toolbar from the toolbar-menu.

1 Like