logo       

Getting mouse clicks in a TextCtrl?: msg#00040

Subject: Getting mouse clicks in a TextCtrl?

As a followup, I can now get mouse clicks using:
    EVT_LEFT_DOWN( $mytextctrl, \&mymousehandler);

But in my handler I still have no idea how to map the X,Y to the word in my 
text (or statictext or listctrl or anything).
I tried playing with HitTest but got an error:

sub mymousehandler {
    my ($self, $event) = @_;
    my ($result, $col, $row);
    $self->HitTest( $result, $col, $row);
}

Can't locate object method "HitTest" via package "Wx::TextCtrl" at 
Narrowtest_ui.pm line 140.
(I am using wxWidgets 2.6.3 with Perl Wx-0.26)

---- Original message: ---------------------------------
I am trying to get what word and what line a user clicks on in a TextCtrl.
I cannot figure out how to get mouse clicks, much less map that to a word, in a 
TextCtrl.

I tried using EVT_LEFT_DOWN but I am not getting any events.
Even if I did get the events, how on Earth will I map it to the word clicked 
on? Do I have to use a fixed width font and calculate the width of the window, 
where the text would wrap, where the scroll is, etc?





-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642


<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

Recently Viewed:
web.pylons.gene...    hurd.l4/2002-10...    kernel.commits....    user-groups.lin...    yellowdog.gener...    java.drools.use...    security.openva...    package-managem...    linux.debian.us...    qnx.openqnx.dev...    genealogy.gramp...    file-systems.if...    voip.wengophone...    tex.context/200...    ietf.smime/2003...    audio.csound.de...    culture.region....    xfree86.devel/2...    mobile.kannel.u...    distributed.con...    education.engli...    org.user-groups...    bug-tracking.gn...    recreation.bicy...   
Home | blog view | USPTO Patent Archive | advertise | OSDir is an inevitable website. super tiny logo

Free Magazines

Cisco News
Receive a free quarterly e-newsletter with exclusive articles on how Cisco IT uses its own products and solutions to enable the business.
subscribe

Systems Management News, the newspaper for IT systems administration and data center managers! Each issue of Systems Management News is chock-full of news and analysis to help you understand what's happening in your field.
subscribe

The Enterprise Newsweekly eWeek is the essential technology information source for builders of e-business.
subscribe

Oracle Magazine Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Oracle (NASDAQ: ORCL) is the world's largest enterprise software company.
subscribe

Total Telecom Total Telecom is "The Economist of the communications industry".
subscribe