FTDI Community

General Category => Discussion - Software => Topic started by: TonyZ on September 20, 2018, 08:15:35 PM

Title: Placing graphic icons on buttons
Post by: TonyZ on September 20, 2018, 08:15:35 PM
Hello,

I would like to create a button with a text label as well as a small icon. I attached an example image. Anyone know how I would
go about doing this?

Thanks,
Tony
Title: Re: Placing graphic icons on buttons
Post by: laffelt on November 19, 2018, 08:25:23 PM
Tony,

I have had to do the same thing. Unfortunately you can't associate a icon within a button nor can the button text be anytinh other than centered within the button. I had to create 3 graphics objects seperately: the button with no text, the bitmap(icon), and the text.

Larry
Title: Re: Placing graphic icons on buttons
Post by: FTDI Community on November 20, 2018, 09:45:01 AM
Hi Tony, Larry,

Instead of using a button widget, you could use the image itself as an icon. If you assign a tag to it in the same way as you would a button, then a press can be detected. Text can either be written on top or part of the image.

There are a few other things you could add such as printing the icon twice and slightly offset to create a shadow/3D effect (you can change the COLOR_RGB or alpha for the rear one) or by drawing a shape behind.   Or you could also make the icon shrink slightly when touched (the easiest way for this might be to have a normal and a slightly smaller version of the icon although EVE can also re-size images)

Best Regards, FTDI Community