You are on page 1of 2

16/05/13

BitBtn glyph - Delphi Pages Forums

Delphi Pages Forums > Delphi Forum > General

User Name User Name Password

Remember Me? Log in Lost Password? Search

BitBtn glyph
Register FAQ Community Calendar

Today's Posts

Thread Tools 08-14-2009, 07:17 PM

Display Modes #1 Join Date: Jun 2009 Posts: 34

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

#2 Join Date: Jun 2009 Posts: 34

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

#3 Join Date: Nov 2001 Posts: 3,573

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

BitBtn glyph -; Delphi Pages Forums 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 )

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

BB code is On Smilies are On [IMG] code is On HTML code is On Forum Rules

Forum Jump General Go

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

You might also like