From: Peter T. <peter@PeterTheobald.com> - 2006-04-19 16:59:27
|
Martin, the important difference is I need to know which WORD was clicked on, not just which element in a list. I could use a list control instead of a text control, but I need to find which of the many words across the row was clicked on. -Peter At 12:38 PM 4/19/2006, Martin Bower wrote: >Hi Peter, > >For a Combobox, I use the code below to see which element in the list has >been selected. It prints out the text of the item selected. > > >EVT_COMBOBOX( $self, $self->{server_combo_box} , \&server_scroll ); > >sub server_scroll { > my( $this, $event ) = @_; > my $id = $this->{server_list}->GetSelection(); > my $text = $this->{server_list}->GetStringSelection(); > print $text; >} > >-----Original Message----- >From: Peter Theobald [mailto:peter@PeterTheobald.com] >Sent: 19 April 2006 17:29 >To: wxperl-users >Subject: [wxperl-users] Getting mouse clicks in a TextCtrl? > > > >I am trying to get what word and what line a user clicks on in a TextCtrl >(or a StaticText or ListCtrl or anything). > >****************************************************************************** >The information in this document, including any attachments or subsequent >correspondence originating from this email address ("email"), is confidential >and may be legally privileged. It is intended solely for the addressee. >However, it may be intercepted by the system controller at Bankgesellschaft >Berlin AG for the purposes of monitoring communications relevant to the system >controller's business. Access to this email by anyone else is unauthorised. > >If you have received this email in error, please notify the Sender immediately >by telephone. Please also delete this email from your computer. > >Any form of reproduction, dissemination, copying, disclosure, modification, >distribution or publication of this email is prohibited without the prior >consent of Bankgesellschaft Berlin AG. If you are not the intended recipient, >any action taken or omitted to be taken in reliance of this email is strictly >prohibited and may be unlawful. Bankgesellschaft Berlin AG accepts no >liability for the consequences of any person acting, or refraining from action >in reliance of this email >****************************************************************************** __--=Peter Theobald=--__ www.PeterTheobald.com |