trichview.com

trichview.support




Re: Is image selected?


Return to index


Author

Message

Yoerdes

Posted: 05/16/2003 16:33:41


I extended the little program that I had made to figure out the

shrinking problem of Metafiles and added an OnClick event to

the Editor


procedure TForm1.EditorClick(Sender: TObject);

var

   ImageSelected: Boolean;


begin

   ImageSelected := Editor.GetSelectedImage <> nil;

   Caption := IntToStr(Integer(ImageSelected));

   if ImageSelected then

     Beep;

end;


Caption is always 0 and therefore the Beep also never happens.


Yoerdes



Sergey Tkachenko wrote:

> Can you give step-by-step instruction how to reproduce this problem?

> I tried in ActionTest demo. I added a button with code

> Caption := IntToStr(Integer(RichViewEdit1.GetSelectedImage));

> I creared document, inserted a picture. In my test, form's caption was

> always correct (='0' or <> '0' depending on selection).

>

>

>

>

>>Yes, the resizing markers are visible but StartOffs and EndOffs have the

>>same values.

>>

>>Yoerdes

>>

>>Sergey Tkachenko wrote:

>>

>>>Since implementing image resizing, single click on image works like

>>

> double

>

>>>click (i.e. selects it from left to right, making StartOffs=0 and

>>>EndOffs=1).

>>>How is this selection shown? Resizing markers must be visible.

>>>Red rectange (more example, rectangle of color RVStyle.HoverColor) does

>>

> not

>

>>>show the selection. It shows that this picture is active (current).

>>

> Image

>

>>>can be active and selected, active and not selected, selected and not

>>>active.

>>>

>>>

>>>

>>>>>(in all cases StartNo=EndNo=0)

>>>>

>>>>that's the case here as well

>>>>

>>>>But I'm selecting the image by just clicking on it.

>>>>If it was not selected before then

>>>>  StartOffs=1  EndOffs=1 if the caret was behind the image and

>>>>  StartOffs=0  EndOffs=0 if the caret was before the image

>>>>

>>>>If I click it again when it's already selected then

>>>>    StartOffs=0  EndOffs=0

>>>>

>>>>All result in GetSelectedImage = nil, but the image is clearly visible

>>>>selected.

>>>>

>>>>Yoerdes

>>>

>

>





Powered by ABC Amber Outlook Express Converter