wprins Posted February 10, 2017 Share Posted February 10, 2017 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 More sharing options...
tappatappa Posted February 10, 2017 Share Posted February 10, 2017 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 More sharing options...
tappatappa Posted February 10, 2017 Share Posted February 10, 2017 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 More sharing options...
wprins Posted February 10, 2017 Author Share Posted February 10, 2017 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 More sharing options...
Administrators Farshad Mohajeri Posted February 10, 2017 Administrators Share Posted February 10, 2017 Do not use Glyph property. Use a TUniNativeImageList and attach your buttons to it. Link to comment Share on other sites More sharing options...
Bertifox Posted June 6, 2017 Share Posted June 6, 2017 Do not use Glyph property. Use a TUniNativeImageList and attach your buttons to it. Hi Farshad Mohajeri, How do i assign the image to unibitbtn from TUniNativeImageList? Does this accept .png? How do i assign the image to unibitbtn from TUniNativeImageList? Does this accept .png? Link to comment Share on other sites More sharing options...
Anuchit Posted January 8, 2019 Share Posted January 8, 2019 On 6/6/2017 at 9:56 PM, Bertifox said: Hi Farshad Mohajeri, How do i assign the image to unibitbtn from TUniNativeImageList? Does this accept .png? How do i assign the image to unibitbtn from TUniNativeImageList? Does this accept .png? glyph in UniBitButton can use only .bmp picture Link to comment Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now