Professional Documents
Culture Documents
BitBtn Glyph - Delphi Pages Forums
BitBtn Glyph - Delphi Pages Forums
BitBtn glyph
Register FAQ Community Calendar
Today's Posts
bitzn
Member BitBtn glyph
I have two .bmp glyphs in a ImageList that I want to load to a BitBtn periodically. I use this code:
C ode:
I m a g e L i s t 1 . G e t B i t m a p ( 1 ,B i t B t n 1 . G l y p h ) ;
The problem is, after I use this code to load the bitmap once, it won't work afterwards to load my second bitmap in the ImageList. Do I need to clear the Glyph somehow?
08-14-2009, 07:20 PM
bitzn
Member
BTW, I can get it to work by setting the Glyph to 'nil', but is this the correct way to do it? Like:
C ode:
B i t B t n 1 . G l y p h: =n i l ; I m a g e L i s t 1 . G e t B i t m a p ( 0 ,B i t B t n 1 . G l y p h ) ;
08-15-2009, 11:06 PM
BaraoZemo
Senior Member
I think that you need to set it to nil to "free" the object and after this you will get a new object (with different size needed to alocate it in memory, so I think that "nil" will reset the state).
Quote:
Originally Posted by bitzn BTW, I can get it to work by setting the Glyph to 'nil', but is this the correct way to do it? Like:
C ode:
B i t B t n 1 . G l y p h: =n i l ; I m a g e L i s t 1 . G e t B i t m a p ( 0 ,B i t B t n 1 . G l y p h ) ;
www.delphipages.com/forum/showthread.php?t=206883 1/2
16/05/13
Previous Thread | Next Thread Posting Rules You You You You may may may may not not not not post new threads post replies post attachments edit your posts
All times are GMT. The time now is 10:47 PM. Delphi Pages - Archive - Top - Contact Us Powered by vBulletin Version 3.8.7 C opyright 2000 - 2013, vBulletin Solutions, Inc.
www.delphipages.com/forum/showthread.php?t=206883
2/2