Article View: borland.public.cppbuilder.nativeapi
Article #9050Re: I forgot!
From: Remy Lebeau (TeamB)
Date: Mon, 09 Aug 2004 01:38
Date: Mon, 09 Aug 2004 01:38
25 lines
1761 bytes
1761 bytes
"Safari" <Safari@alloymail.com> wrote in message
news:4116d28a@newsgroups.borland.com...
> Please correct this my error,
> One TSpeedButton for any TEdit.
First off, you need to pick more meaningful message subjects. "I forgot"
doesn't say anything meaningful at all.
Second, your code is casting incorrectly. It should be more like this:
void __fastcall TMain::Button1Click(TObject *Sender)
{
if( OpenDialog->Execute() )
{
TEdit *Edit =
dynamic_cast<TEdit*>(FindComponent(static_cast<TSpeedButton*>(Sender)->Hint)
);
if( Edit )
Edits->Text = OpenDialog->FileName;
}
}
Gambit
Technical Details
Message-ID:
<4116d56e$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!news.maxwell.syr.edu!newsfeed.icl.net!newsfeed.freenet.de!216.196.110.149.MISMATCH!border2.nntp.ams.giganews.com!border1.nntp.ams.giganews.com!nntp.giganews.com!fr.ip.ndsoftware.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailReferences:
<4116b16e@newsgroups.borland.com> <4116d1a6@newsgroups.borland.com> <4116d28a@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,e0b56aa1e034b25f X-Google-Attributes: gid10cc67,public X-Google-Language: ENGLISH,ASCII-7-bit From: "Remy Lebeau \(TeamB\)" <gambit47.no.spam@no.spam.yahoo.com> Newsgroups: borland.public.cppbuilder.nativeapi References: <4116b16e@newsgroups.borland.com> <4116d1a6@newsgroups.borland.com> <4116d28a@newsgroups.borland.com> Subject: Re: I forgot! Date: Sun, 8 Aug 2004 18:38:29 -0700 Lines: 27 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1409 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1409 NNTP-Posting-Host: 68.69.17.41 Message-ID: <4116d56e$1@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1092015470 68.69.17.41 (8 Aug 2004 18:37:50 -0700) Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!news.maxwell.syr.edu!newsfeed.icl.net!newsfeed.freenet.de!216.196.110.149.MISMATCH!border2.nntp.ams.giganews.com!border1.nntp.ams.giganews.com!nntp.giganews.com!fr.ip.ndsoftware.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail