Hi Steve,

Try this,

procedure TForm1.Button15Click(Sender: TObject);
begin
if OpenDialog1.Execute then
   Edit13.Text := Opendialog1.Filename
else
   Edit13.Text := "No file selected";
end;

Kind Regards
Grant Brown

Steve Bowker wrote:
> Hi,
> It's always the way, you try and do something simple, and run into a brick 
> wall!
>  
> OK, I have a button I click to open up a dialog:
>  
> procedure TForm1.Button15Click(Sender: TObject);
> begin
>   OpenDialog1.Execute;
>   OpenDialog1.FreeOnRelease;
> end;
>  
> When I click the button, the dialog pops up, I select a file, and just want 
> to display it in an Edit field as follows:
>  
> procedure TForm1.OpenDialog1Close(Sender: TObject);
> begin
>   Edit13.Text := Opendialog1.Filename;  
> end;
>
> But what is displayed in the Edit field is rubbish such as  "às" or "@t" - 
> which is strange because the contents differ even if I select the same file 
> each time!
>  
> I think this might be something to do with Unicode characters(?) but am not 
> sure.
> I am using Delphi 5 on Windows XP SP2
>  
> Any help appreciated.
>  
> Regards,
> Steve Bowker
> _______________________________________________
> Delphi mailing list -> [email protected]
> http://lists.elists.org/cgi-bin/mailman/listinfo/delphi
>   

-- 
Kind Regards
Grant Brown

SiteDoc Pty Ltd
mob: 0412 926 995
www.sitedoc.com.au
__________________________________________________________________________________________________________
This email message together with any attachments is intended only for the 
addressee(s) and contains information that may be confidential and/or 
copyright.  If you are not the intended recipient, please notify the sender by 
reply email (or telephone SiteDoc Pty Ltd on +61 2 42291185) and immediately 
delete this email together with any attachments from your computer. If you are 
the intended recipient, you must not copy, disclose, reproduce or distribute 
this communication together with any attachments without the authority of 
SiteDoc Proprietary Limited. No representation is made that this email or any 
attachments are free of viruses. Virus scanning is recommended and is the 
responsibility of the recipient. Unless specifically stated by the sender as 
the views of SiteDoc Proprietary Limited, any views expressed in this message 
are those of the individual sender, and no responsibility will be borne by 
SiteDoc Proprietary Limited for its content or outcomes.


_______________________________________________
Delphi mailing list -> [email protected]
http://lists.elists.org/cgi-bin/mailman/listinfo/delphi

Reply via email to