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
 TImageEnVect dynamic create

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
lostman Posted - May 10 2013 : 05:49:38
var
vect: TImageEnVect;

begin
vect:= TMyImageEnVect.Create(Self);
vect.Parent:=Self;
vect.Align:= alClient;
vect.AddNewObject(iekBOX, Rect(10,10,100,100), clRed);
end;

When using this code, not create any object. Canvas is white.



1   L A T E S T    R E P L I E S    (Newest First)
w2m Posted - May 10 2013 : 06:41:44
When ImageEnVect is created at runtime it looks like it is important to create a bitmap before adding an object:
procedure TForm1.FormCreate(Sender: TObject);
var
  hobj: integer;
begin
  ImageEnVect := TImageEnVect.Create(self);
  ImageEnVect.Parent := self;
  ImageEnVect.Left := 0;
  ImageEnVect.Top := 0;
  ImageEnVect.Align := alClient;
  ImageEnVect.Background := clBtnFace;
  ImageEnVect.BorderStyle := bsSingle;
  ImageEnVect.BackgroundStyle := iebsSolid;
  ImageEnVect.IEBitmap.Allocate(640, 480); // Important  
  ImageEnVect.IEBitmap.Fill(clBtnFace);
  ImageEnVect.Update;
  ImageEnVect.AddNewObject(iekBOX, Rect(10, 10, 100, 100), clRed);
end;

William Miller
Email: w2m@frontiernet.net
EBook: http://www.imageen.com/ebook/
Apprehend: http://www.frontiernet.net/~w2m/index.html