ImageEn for Delphi and C++ Builder ImageEn for Delphi and C++ Builder

 

ImageEn Forum
Profile    Join    Active Topics    Forum FAQ    Search this forumSearch
 All Forums
 ImageEn Library for Delphi, C++ and .Net
 ImageEn and IEvolution Support Forum
 Different colors for background and clientrect

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!

View 
UserName:
Password:
Format  Bold Italicized Underline  Align Left Centered Align Right  Horizontal Rule  Insert Hyperlink   Browse for an image to attach to your post Browse for a zip to attach to your post Insert Code  Insert Quote Insert List
   
Message 

 

Emoji
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Black Eye [B)]
Frown [:(] Shocked [:0] Angry [:(!] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
Check here to subscribe to this topic.
   

T O P I C    R E V I E W
BionicWave Posted - Mar 08 2012 : 06:31:01
Is it possible to set different back-colors for the image- and the clientrect-background of an ImageEnview?
I would like to be able to distinguish where the actual image begins and where the background of the ImageEnView is.
1   L A T E S T    R E P L I E S    (Newest First)
fab Posted - Mar 08 2012 : 07:38:35
The background style and color is unique.
However you could handle OnDrawBackground event to customize it, for example:
procedure TForm1.ImageEnView1DrawBackground(Sender: TObject; ACanvas: TCanvas; ARect: TRect; var Handled: Boolean);
begin
  Handled := true;

  // the whole background is green
  ACanvas.Brush.Color := clGreen;
  ACanvas.FillRect(ARect);

  // the image background is yellow
  ACanvas.Brush.Color := clYellow;
  with ImageEnView1 do
    ACanvas.FillRect(Rect(OffsetX, OffsetY, OffsetX + ExtentX, OffsetY + ExtentY));
end;