Bixby Sayz Posted February 5, 2012 Share Posted February 5, 2012 Can't seem to get a picture loaded onto a TBitBtn. In theory this should work??? BitBtn.Glyph := BitmapFromString(20, 20, 'SomeBitmapStringHere'); If only the form editor copied over the images when you hit generate... Quote Link to comment Share on other sites More sharing options...
FHannes Posted February 5, 2012 Share Posted February 5, 2012 No, it shouldn't, SCAR's bitmap system is in no way compatible with any of the form components... The glyph property of a TBitBtn is a TBitmap, you have to load the bitmap into a variable and then use TBitmapFromBmp(BitBtn.Glyph, Bitmap); After that you can use FreeBitmap, the bitmap will have been copied onto the TBitmap canvas. Quote Link to comment Share on other sites More sharing options...
Bixby Sayz Posted February 6, 2012 Author Share Posted February 6, 2012 Ah. Which brings me to a question I have had for a while now: Will scar ever use its own internal types? For example Use TBitmap for the various bitmap related routines instead on an integer currently used, TCanvas for the canvas routines, etc. Quote Link to comment Share on other sites More sharing options...
FHannes Posted February 6, 2012 Share Posted February 6, 2012 Using TBitmap would cause a serious performance hit, so no, however, I will probably introduce a TSCARBitmap or something of the sort in the future (SCAR 4), to replace a lot of the bitmap routines like FastSetPixel and such. Quote Link to comment Share on other sites More sharing options...