Note: You must be registered in order to post a reply. To register, click here. Registration is FREE!
T O P I C R E V I E W
Elemental
Posted - Mar 31 2014 : 12:37:22 I have a TImageEnMView and a TImageEnMIO on my form, connected to each other through the AttachedMView property. I've noticed in my code that sometimes I use the TImageEnMIO component and sometimes I use the MIO property of the TImageEnMView component. Are they, in fact, interchangeable? Does it matter which one I use in code? By setting properties on one, am I really doing it to the other?
8 L A T E S T R E P L I E S (Newest First)
xequte
Posted - Apr 01 2014 : 15:08:53 Hmmm, yes, I will add a OnAcquireBitmap event to TImageEnView and TImageEnMView
Posted - Apr 01 2014 : 13:44:08 Yes on line but not in the help file itself for TImageEnMView events... I guess it is easy to get confused where to find it.
ImageEnMView1.MIO.OnAcquireBitmap event is not in the help file.
William Miller
xequte
Posted - Apr 01 2014 : 00:17:38 As Bill described, for all visual stuff you would use TImageEnMView.MIO. TImageEnMIO is only used directly if you need non-visual functionality.
You can assign your OnAcquireBitmap event at run time:
procedure Tfmain.FormCreate(Sender: TObject);
begin
ImageEnMView1.MIO.OnAcquireBitmap := MyAcquireBitmapEvent;
end;
Posted - Mar 31 2014 : 13:19:43 The reason I use a TImageEnMIO at all is because I can handle the OnAcquireBitmap event. I suppose if I want to handle the OnProgress event I can handle the multi-view's OnIOProgress event.
w2m
Posted - Mar 31 2014 : 13:16:10 Yes they are inter-changeable as long as they are connected. But why even use the TImagEnMIO component when it is already built into TImageEnMView? It is not necessary to use TImageEnMIO at all. If fact, nearly all the time I always use TImageEnMView.MIO... The same is true for TImageEnMView.Proc and TImageEnProc.
Generally I use TImageEnMIO by itself, not attached, to be able to load and access an image without it appearing in TImageEnMView.
The same this is also true for TImageEnView or TImageEnVect with respect to TImageENIO and TImageEnProc with either of these components.
In the long run it is better not to use an attached ImasgeEnMIO or an attached TImageEnProc, because your code will be easier to understand.