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

 

ImageEn Forum
Profile    Join    Active Topics    Forum FAQ    Search this forumSearch
Forum membership is Free!  Click Join to sign-up
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 ImageEn Library for Delphi, C++ and .Net
 ImageEn and IEvolution Support Forum
 SetImage call for TImageEnView?
 New Topic  Reply to Topic
Author Previous Topic Topic Next Topic  

cpstevenc

USA
125 Posts

Posted - Apr 23 2013 :  08:40:03  Show Profile  Reply
I have a TImageEnMView and TImageEnView.

I can do this with the TImageEnMView to set image indexs for thumbs
to be a bitmap from my imagelist (JVCL TJVImageList)

myTImageEnMView.SetImage(0,Images.Items[0].bitmap);

This works.. but I can't seem to find how to do something like this
with a TImageEnView? I need to be able to load images from list,
and just stuck at a wall here. Know it has to be simple,
but I am at that place of just over looking something now it seems.



w2m

USA
1990 Posts

Posted - Apr 23 2013 :  09:25:01  Show Profile  Reply
There is no specific method to set the image with ImageEnView so just assign its bitmap:
procedure TForm1.Button1Click(Sender: TObject);
var
  iIndex: integer;
begin
   iIndex := StrToInt(Edit1.Text);
   ImageEnView1.Bitmap.Assign(JvImageList1.Items[iIndex].Bitmap);
   ImageEnView1.Update;
end;

or in your case:
ImageEnView1.Bitmap.Assign(JvImageList1.Items[0].Bitmap);

William Miller
Adirondack Software & Graphics
Email: w2m@frontiernet.net
EBook: http://www.imageen.com/ebook/
Apprehend: http://www.frontiernet.net/~w2m/index.html
Go to Top of Page

cpstevenc

USA
125 Posts

Posted - Apr 23 2013 :  09:40:57  Show Profile  Reply
Thanks!

I ended up trying this but did not have the update call.
Go to Top of Page

w2m

USA
1990 Posts

Posted - Apr 23 2013 :  10:02:09  Show Profile  Reply
When you load or assign an image to ImageEnView it is always good practice to call update. It does not slow down your application and ensures the image is displayed.

William Miller
Go to Top of Page

xequte

39053 Posts

Posted - Apr 28 2013 :  18:54:40  Show Profile  Reply
Thanks William,

Specifically speaking, when loading an image into an ImageEnView (through normal methods) Update will be called automatically.

However you must call Update when modifying the underlying Bitmap/IEBitmap through your own code.


Nigel
Xequte Software
www.xequte.com
nigel@xequte.com
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
Jump To: