Thanks for your reply Arnaud.

Le 10 mai 07, à 19:27, Arnaud Nicolet a écrit :
>>
>> in the mouseUp event :
>>      self.ef2.text=str(me.CharPosAtXY(X,Y))
>>
>> The number displayed in efNb is right, but the caret doesn't move at
>> all.
>
> When you return true in the MouseDown event, the event is stopped in
> the events chain.
> Why don't you simply put self.ef2.text=str(me.CharPosAtXY(X,Y)) in
> the MouseDown event?
>

You're right, it works. I'm used to having actions fired on mouseUp 
(the good old days of Hypercard...), but in that case, it doesn't make 
a real difference.

>> SECOND PROBLEM :
>> If the user moves the caret with the keyboard arrows, the only
>> function
>> I can use is selStart(), with :
>>
>>      self.ef2.text=str(me.SelStart)
>>
>> The problem is that selStart() doesn't work properly. The returned
>> number can decrease when you move the caret one character to the
>> right,
>> ...
>
> That's normal. SelStart is the number of characters from the first
> character to where the insert point is. So, if you move up to one
> line, SelStart will decrease to <number of characters per line>.
>
>> ...
>
> Don't you confuse with the SelLength property?
>

I don't think so. The Language reference defines SelStart as "The 
position of the insertion point"  and SelLength as "The number of 
highlighted characters.". You select the 5 first characters of 
"abcdefgh" with :
   ef1.SelStart=0
   ef1.SelLength=5

Octave
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>

Reply via email to