🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.database.ado
Article #3796

Re: DBEdit Question ?

#3796
From: Ronnie
Date: Mon, 24 Jun 2002 13:39
41 lines
2111 bytes
Hi Uros,

Is this you're looking for?:

void __fastcall TForm1::DBEdit1Click(TObject *Sender)
{
    DBEdit1->SelStart = 0;
    DBEdit1->SelLength = DBEdit1->Text.Length();
}
//--------------------------------------------------------------------------
-

If you don't want the text to be selected:

DBEdit1->SelStart = DBEdit1->Text.Length();


HTH
--
Ronald Loonstra
CodeFit Applications
www.codefit.nl
"Uros Obradovic" <ouros@hotmail.com> schreef in bericht
news:3d13ce83$1_1@dnews...
> Ok guys,
> I would need some help here
>
> I have a DBEdit control on my form and two buttons NEW and UPDATE. When I
> click on the button NEW, the new record is being created in a database.
> When I click on DBEdit control to enter a new record, this control should
be
> blank, which is not a problem to do (using OnClick properties), but when I
> lets say do a search, and have some value in the DBEdit control, what I
> wanna do is: when I click on it, my cursor should be on the end of the
> string thats stored in this control.
> How to do that ? Hope you understand my question
>
> thx
> Uros
>
>
Technical Details
Message-ID: <3d171fcb$2_2@dnews>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-05!sn-xit-03!supernews.com!yellow.newsread.com!bad-news.newsread.com!netaxs.com!newsread.com!news-out.spamkiller.net!propagator2-maxim!propagator-maxim!news-in.spamkiller.net!news02.tsnz.net!newsfeed01.tsnz.net!newsfeeds.ihug.co.nz!ihug.co.nz!dnews
References: <3d13ce83$1_1@dnews>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10698b,17022894568b684
X-Google-Attributes: gid10698b,public
X-Google-ArrivalTime: 2002-06-24 06:38:22 PST
From: "Ronnie" <r.loonstra@home.nl>
Newsgroups: borland.public.cppbuilder.database.ado
References: <3d13ce83$1_1@dnews>
Subject: Re: DBEdit Question ?
Date: Mon, 24 Jun 2002 15:39:07 +0200
Lines: 43
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.50.4522.1200
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200
NNTP-Posting-Host: 217.121.245.5
Message-ID: <3d171fcb$2_2@dnews>
X-Trace: dnews 1024925643 217.121.245.5 (24 Jun 2002 06:34:03 -0700)
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-05!sn-xit-03!supernews.com!yellow.newsread.com!bad-news.newsread.com!netaxs.com!newsread.com!news-out.spamkiller.net!propagator2-maxim!propagator-maxim!news-in.spamkiller.net!news02.tsnz.net!newsfeed01.tsnz.net!newsfeeds.ihug.co.nz!ihug.co.nz!dnews