Hi Peter,
Try the mouseCharChunk - in theory there's room for it to not work every
time, but in practical terms it'll probably do the job consistently and
well. The mouseCharChunk will tell you what char of a word has the mouse
hovering over it at a given moment. With execution speeds being what
they are, it'll probably work fine.


Peter Reid wrote:
> 
> I'm trying to implement a simulation of a system that displays HTML
> information with hot links.  However, the tricky 'extra' is the fact
> that each single word/phrase hot link is actually treated as two
> halves with a click on the first half of a hot word taking you
> backwards and a click on the second half taking you forwards!
> 
> The problem I'm having is that I can't easily work out which half of
> a hot word the user has clicked into.  I can get the ClickText() for
> the whole word and the ClickChunk() tells me the chars of the whole
> word. The ClickLoc() gives me a coordinate pair, but I can't see how
> to relate this to the characters in the hot word.  What makes life
> difficult is the fact that the HTML has variable size text as well as
> some mixed plain and bold text.
> 
> I tried splitting a single word into two separate words and making
> them individual hot words, but came up with the problem of having to
> make them look like a single word whilst behaving as if there's some
> character separating them.
> 
> Anyone got any good ideas for this?
> 
> Also, once I've detected a hot word, I need to jump to another line
> within the field.  How do I reliably reposition a field with variable
> height lines on a line boundary?  I tried adding the textHeight of
> all lines from top to required line, multiplying the total by 4/3 and
> then setting the vScroll accordingly.  Unfortunately, this isn't
> reliable, especially if there is a blank line as this returns an
> empty textHeight.
> 
> Any ideas for this?
> --------------------------------------------------------
> Peter Reid
> Reid-IT Limited, Loughborough, Leics., UK
> Tel: +44 (0)1509 268843 Fax: +44 (0)1509 264986
> E-mail: [EMAIL PROTECTED]
> Web: http://www.reidit.co.uk

-- 
Phil Davis
------------------
[EMAIL PROTECTED]

Reply via email to