I'm using Borland C++Builder 6.
I would like to use the TImage
component and just fill its content in a specific color (assume, black) - how can I do that?
I'm using Borland C++Builder 6.
I would like to use the TImage
component and just fill its content in a specific color (assume, black) - how can I do that?
be more specific your text is a bit vague
Sorry I do not use TImage
component but its high likely your TImage
has Canvas
so you can use GDI try something like:
img->Canvas->Brush->Color=clBlack;
img->Canvas->Brush->Style=bsSolid;
img->Canvas->FillRect(TRect(0,0,img->Width,img->Height));
img
is your TImage component nameUpdate
similar to TPanintbox
img->Update();
or img->Refresh/Repaint...
before this or move the rendering to different event like img->OnPaint
...ClientWidth,ClientHeight
if TImage
has them (not all components does)