🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.nativeapi
Article #4189

Re: User clicks on Memo

#4189
From: JD
Date: Wed, 01 Mar 2006 22:36
24 lines
1647 bytes
"HF" <(min_charATyahooPUTADOTgr)(HellenicFire)> wrote:
>
> I think this works ok

I think that you may have misunderstood the question. I
believe that the OP wants a line index of some king into
the memo's text.

>//------------------------------------------------------------
>void __fastcall TForm1::Memo1Click(TObject *Sender)
>{
>   TPoint pp = Memo1->CaretPos;
>   ShowMessage("Current Line : "+ IntToStr(pp.y+1));
>}
>//------------------------------------------------------------

If all you want is the click point relative to the TMemo's
ClientArea, then the OnMouseDown event is better suited
because it's parameter list includes ClientArea-relative
X and Y. You also won't have to code around an OnClickEvent
if it's ever implemented.

~ JD
Technical Details
Message-ID: <44063019@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail
References: <997c029a5t0qjqsm19sajsj7mn1ob6jh1s@4ax.com> <44062da0@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,92a044aea584f07d
X-Google-Attributes: gid10cc67,public
X-Google-Language: ENGLISH,ASCII-7-bit
From: "JD" <nospam@nospam.com>
Sender: "JD" <nospam@nospam.com>
Reply-To: "JD" <nospam@nospam.com>
Subject: Re: User clicks on Memo
Newsgroups: borland.public.cppbuilder.nativeapi
X-User-Info: 64.12.116.201     
X-Forwarded-For: 172.168.31.129
References: <997c029a5t0qjqsm19sajsj7mn1ob6jh1s@4ax.com> <44062da0@newsgroups.borland.com>
NNTP-Posting-Host: 207.105.83.66
Message-ID: <44063019@newsgroups.borland.com>
Date: 1 Mar 2006 15:36:57 -0700
X-Trace: newsgroups.borland.com 1141256217 207.105.83.66 (1 Mar 2006 15:36:57 -0700)
Lines: 25
Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail