Jump to content

TUniSpeedButton.Glyph, loading PNG results in "Invalid Graphic Format"


wprins

Recommended Posts

1) I am trying to use icons from here:

https://material.io/icons/

 

When clicking on the "Glyph" property in Delphi and then Clicking "Load" and selecting a PNG sourced from there, the image is loaded and displayed but when you then click OK, an error message "Invalid graphic format" is displayed with call stack as follows:

http://i.imgur.com/wiOns0Z.png

 

The same happens with a conventional VCL TSpeedButton so it looks like some kind of Delphi bug, but mentioning just in case this is something UniGUI can do something about.

 

2) Additionally I notice TUniSpeedButton has "Images" and "ImageIndex" properties.  I'd assumed that assigning a TUniImageList, populating it with PNG (which does work) and setting ImageIndex might cause the button to display the image but this appears to do nothing.   Can you clarify whether this is supposed to work or why these properties appear to be ignored?

 

Thanks

 

Walter

 

 

 

 

Link to comment
Share on other sites

2) Additionally I notice TUniSpeedButton has "Images" and "ImageIndex" properties.  I'd assumed that assigning a TUniImageList, populating it with PNG (which does work) and setting ImageIndex might cause the button to display the image but this appears to do nothing.   Can you clarify whether this is supposed to work or why these properties appear to be ignored?

 

Thanks

 

Walter

 

It does work with TUniBitBtn, I use them a lot in my project. Do you need SpeedButton specifically?

Link to comment
Share on other sites

1) I am trying to use icons from here:

https://material.io/icons/

 

When clicking on the "Glyph" property in Delphi and then Clicking "Load" and selecting a PNG sourced from there, the image is loaded and displayed but when you then click OK, an error message "Invalid graphic format" is displayed with call stack as follows:

http://i.imgur.com/wiOns0Z.png

 

The same happens with a conventional VCL TSpeedButton so it looks like some kind of Delphi bug, but mentioning just in case this is something UniGUI can do something about.

 

 

Glyph doesn't work with PNG with Alpha Channel (transparency)

Link to comment
Share on other sites

It does work with TUniBitBtn, I use them a lot in my project. Do you need SpeedButton specifically?

 

Not particularly, thanks for the suggestion.  (I wish Embarcadero would give the VCL image handling/buttons etc a once over as this type of thing is quite naff really...)

Link to comment
Share on other sites

  • 3 months later...
  • 1 year later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...