Welcome Serena Central users! CLICK HERE
The migration of the Serena Central community is currently underway. Be sure to read THIS MESSAGE to get your new login set up to access your account.
RobertRedekop Trusted Contributor.
Trusted Contributor.
375 views

Is there a way to use SVG (scalable vector graphics) with a bitmap button?

It's time to revamp our bitmap button bar, and before we invest in code that decides on which of several size bitmaps to use, depending on screen resolution, one thought is to simply use an SVG icon instead of a bitmap icon.  Anyone figure out how to do this?

0 Likes
3 Replies
Micro Focus Expert
Micro Focus Expert

RE: Is there a way to use SVG (scalable vector graphics) with a bitmap button?

Just an idea, instead of the bitmap bar, you provide a browser control that is the same shape / size of the bitmap bar, the browser loads your HTML page which contains buttons (which are links to appropriate program or function) and these buttons use your SVG images.
0 Likes
RobertRedekop Trusted Contributor.
Trusted Contributor.

RE: Is there a way to use SVG (scalable vector graphics) with a bitmap button?

Nice outside the box thinking (by introducing a box...)

Our button bar simply adds a bunch of function keys (unique exception values, not actually mapped to same exception as the real function keys). I've used the browser control to display stuff, but never interacted. I'm guessing from the documentation I would have to:
- build a page with the button bar images, each button set with a unique "URL" that I can map to an internal function key.
- display the browser control
- In my main accept, watch for event MSG-WB-BEFORE-NAVIGATE, which would happen when the user clicks on a "button" in the "button bar"
- get the value from the "NAVIGATE-URL" property
- set EVENT-ACTION to EVENT-ACTION-FAIL
- internally set my "function key" value
- process that value.

Am I on the right track there?
0 Likes
Micro Focus Expert
Micro Focus Expert

RE: Is there a way to use SVG (scalable vector graphics) with a bitmap button?

Yes, that looks like a good way to do it.
0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.