If you can somehow convert a mouse-hover action into a mouse-press action, 
the following would be a solution:

1. save carret position
2. propagate event (text-control will move the carret)
3. obtain carret position as character index
4. restore carret position

There are some wxHaskell functions that deal with events, but I'm not sure 
whether or not they provide the required functionality.

Greetings,
Arie


----- Original Message ----- 
From: "Mads Lindstrøm" <[EMAIL PROTECTED]>
To: <[email protected]>
Sent: Sunday, February 18, 2007 6:23 PM
Subject: [wxhaskell-users] From mouse position to character index (textCtrl)


Hi all

I have created a text-control and I want to know which character the
mouse is hovering over. Getting the mouse position is easy enough.
However converting the mouse position to a character index (into the
text-control's text) seems very difficult.

Anybody knows how to go from mouse position to character index?

/Mads Lindstrøm



-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
wxhaskell-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wxhaskell-users


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
wxhaskell-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wxhaskell-users

Reply via email to