On Sat, 1 Dec 2007 11:46:16 +0200 "Octavian Rasnita" <[EMAIL PROTECTED]> wrote:
Hi, > I have a multiline text field with a text in it, and I want to allow the > users to double click a word and an event should be fired in that moment, > and then I want to be able to get the word that was clicked in the event > handler. > > When the word is double-clicked, it is highlighted automaticly, and I might > be able to get that selected text from the text field, or maybe the > word-selection occurs after the event is fired, and in that case I might > need to be able to get the character ID on the position where the click was > made. If the selection happens after the click you could also use an idle handler to get at the selection (idle handlers run in idle time, when all events have been processed). > Please tell me what event can I use to detect the double click in an edit > field, and what method could I use to find the selected word... if it is > possible. wxMouseEvent (EVT_LEFT_DCLICK, etc...) might do what you want. $textctrl->GetStringSelection can be used to get the current selection. Regards, Mattia
