Author |
Topic  |
|
jenswahl
 
Germany
74 Posts |
Posted - May 24 2012 : 05:08:16
|
Hello,
I'm using Delphi 5 Prof. with ImageEn 3.1.2 on Windows 7 (32 & 64 bit). In connection with Alphacontrols (skinning components) I wanted to show a preview to thumbnails in an ImageEnMView (without an extra area for the preview). Alphacontrols gives the possibility to show a TFrame as a hint. So I placed an ImageEnView-control on the frame: the image is loaded on showing the hint (ImageEnView.IO.Params.Filename has the correct value), but is not displayed (also if DrawVersion is true I can't see the version). If I place an TImage- or TmcmImage-control on the frame then I can see the loaded image. What could be the reason for it? Another ImageEnView-control on the main form shows the loaded image.
I use the following code on displaying the hint:
//Hintstr is the path to the image which should be shown procedure TForm1.sHintManager1ShowHint(var HintStr: String; var CanShow: Boolean; var HintInfo: THintInfo; var Frame: TFrame); begin //iemvNav is the ImageEnMView if HintInfo.HintControl = iemvNav then begin //create the frame for showing the hint Frame := TFrameHint.Create(nil); //shows the filename OK TFrameHint(Frame).slblHint.Caption := HintStr; //loads the image into ImageEnView (ievHint) TFrameHint(Frame).ievHint.IO.LoadFromFile(HintStr); //all the following for nothing: TFrameHint(Frame).ievHint.Refresh; TFrameHint(Frame).ievHint.Update; TFrameHint(Frame).ievHint.Repaint; TFrameHint(Frame).ievHint.Show; //shows the image OK TFrameHint(Frame).mcmHint.Image.FileOpen(HintStr); //shows the image OK TFrameHint(Frame).Image1.Picture.LoadFromFile(HintStr); //nothing: // Application.ProcessMessages; end end;
The Properties of ievHint is shown on the attached image:
Kind Regards
Jens
 |
|
fab
   
1310 Posts |
Posted - May 24 2012 : 07:11:03
|
I'm sorry, unfortunately I cannot test ImageEn with Alphacontrols. I can only suggest a try. You have:
Frame := TFrameHint.Create(nil);
Instead of "nil", could you assign a visible form or create TFrameHint at design-time? |
 |
|
jenswahl
 
Germany
74 Posts |
Posted - May 24 2012 : 07:45:11
|
Hi Fabrizio,
I know that you can't test it. If I'm using Self instead of nil (default by Alphacontrols) I get the same result. The image is loaded into ImageEnView but not displayed.
Kind Regards
Jens
|
 |
|
fab
   
1310 Posts |
Posted - May 24 2012 : 08:25:52
|
Hi Jens, does TFrameHint.Parent exists? If yes, try to set also TFrameHint.Parent := self. |
 |
|
jenswahl
 
Germany
74 Posts |
Posted - May 24 2012 : 22:38:13
|
Hi Fabrizio,
I will try it, thanks for the idea.
Another try from me was to set the parent of Frame to the TImageEnMView. Then I can short see the frame at position 0,0 of the TImageEnMView in the skinned color (e.g. black background) and also the DISPLAYED image in TImageEnView. Than the frame is shown as a hint on the hint position in the hint color (e.g. yellow) with an empty TImageEnView. So I'm thinking that the skinning component is the reason and not TImageEnView (but why is the loaded image shown in TImage and TmcmImage???) and will further try in this direction. If I will have a result I will post it here.
Kind Regards
Jens |
 |
|
|
Topic  |
|