trichview.com

trichview.support




Re: Is image selected?


Return to index


Author

Message

Yoerdes

Posted: 05/14/2003 23:11:02


> (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



Sergey Tkachenko wrote:

> If there is the only one image in the document, there are 4 possible cases

>

> (in all cases StartNo=EndNo=0)

>

> 1) Image is selected from left to right

>  StartOffs=0 EndOffs=1

> 2) Image is selected from right to left

>  StartOffs=1 EndOffs=0

> 3) Image is not selected (caret before it)

>  StartOffs=0 EndOffs=0

> 4) Image is not selected (caret after it)

>  StartOffs=1 EndOffs=1

>

> I just tested: in (1) and (2) GetSelectedImage<>nil, in (3) and (4) it is

> nil (as it's expected)

>

>

>

>>Well, the problem is that the image *is* selected since the handles

>>*are* there as I described in my following message.

>>But the values are not always the same when it's selected and I have to

>>select and unselect it several times to finally get a result that

>>reflects what is displayed.

>>

>>Yoerdes

>>

>>

>>Sergey Tkachenko wrote:

>>

>>>If all these values are zeros, the image is not selected (and you cannot

>>

> see

>

>>>resizing handles, and it will not be copied to the clipboard on Ctrl+C).

>>

> If

>

>>>all values are zeros, the caret is before the image, and the selection

>>

> is

>

>>>empty.

>>>(but this image is active ("current"), so it is outlined and, for

>>

> example,

>

>>>"Object Properties" action can work with it)

>>>

>>>

>>>

>>>>The image is selected but Line 3499 in unit CRVFData causes the result

>>>>to be nil. The values for StartNo, EndNo, StartOffs, EndOffs are all 0.

>>>

>

>





Powered by ABC Amber Outlook Express Converter