for a custom Canvas Control I wrote I would like to draw sometimes one of the three Xojo supported system icons:
Graphics.DrawCautionIcon(X as Integer, Y as Integer)
Graphics.DrawNoteIcon(X as Integer, Y as Integer)
Graphics.DrawStopIcon(X as Integer, Y as Integer)
The icons should be drawn in a certain size. That’s impossible, because the three methods above haven’t any parameters to scale the icons like the Graphics.DrawPicture Methods. I created a Feedback-Case: <https://xojo.com/issue/49459>
Has anyone a solution to this until the developers will hopefully integrate this into Xojo?
My recollection is that it’s the OS that wants them drawn at a particular size, although that could be out-of-date because I don’t think I’ve seen anyone use those methods in a few years.
Can you give an example as to why you’d want them drawn at a different size?
I made a subclass of TextInputCanvas and wanna validate the text after typing. If the text is wrong, I would like to show the native Stop Icon (macOS, Win, Linux). On my MacBook Pro Retina, the DrawStopIcon Methods draws the Icon large. But if my control is e.g. sized to an Height of 22 Pixels, that’s to large. I don’t wanna use external pictures.