Delphi Pages Forums  

Go Back   Delphi Pages Forums > Delphi Forum > General

Lost Password?

Reply
 
Thread Tools Display Modes
  #1  
Old 01-24-2001, 01:05 PM
whatever_ whatever_ is offline
Member
 
Join Date: Jan 2001
Posts: 36
Default dumb question

this is probably a dumb question and is wrong here but I tried to contact the author but the email isnt working and so is the website..

well here my question:
---
theres a nice tfilelist component at http://www.etsimo.uniovi.es/pub/delphi/ftp/d20free/flist230.zip

does anyone can tell me how to get the filename the user selected? if I do filelist.select.caption I only get the name WITHOUT the extension. I searched the components source on how to modify it to get the extension but didnt get to any solution but thats probably because im still not very experienced in delphi.

I also searched for other components which do the same task but didn't find anything as good as it.

any help is greatly appreciated.
Reply With Quote
  #2  
Old 01-26-2001, 08:16 AM
MrBaseball34 MrBaseball34 is offline
Senior Member
 
Join Date: Jan 2001
Posts: 7,260
Default RE: dumb question

I tried both these approaches and they worked for me.
Could you be doing something different?

procedure TForm1.FileList1Change(Sender: TObject; Item: TListItem;
Change: TItemChange);
begin
Label1.Caption := Item.Caption;
end;

procedure TForm1.Button1Click(Sender: TObject);
begin
Label2.Caption := FileList1.Selected.Caption;
end;

My FileList1 component isdefined like this:

object FileList1: TFileList
Left = 95
Top = 32
Width = 576
Height = 150
ReadOnly = False
Items.Data = { }
OnChange = FileList1Change
TabOrder = 0
ViewStyle = vsReport
AcceptFiles = False
Directory = 'c:\'
FileTypes = [ftArchive, ftReadonly]
DisplayParentDir = False
Mask = '*.*'
ViewColumns = [fiName, fiSize, fiType, fiModified]
end
Reply With Quote
  #3  
Old 01-28-2001, 02:32 AM
whatever_ whatever_ is offline
Member
 
Join Date: Jan 2001
Posts: 36
Default RE: RE: dumb question

hrm well I created a new application and did exactly what you did, but I still don't get the file extension for registred file types.

if there's a "test.doc" I would only see/get "test" in the listbox
Reply With Quote
  #4  
Old 01-29-2001, 11:29 AM
MrBaseball34 MrBaseball34 is offline
Senior Member
 
Join Date: Jan 2001
Posts: 7,260
Default RE: RE: RE: dumb question

View your form as text and copy the section defining
TFileList and post it in a reply. I think you may have a
wrong property setting.
Reply With Quote
  #5  
Old 01-31-2001, 04:05 AM
dima_kozhinov dima_kozhinov is offline
Junior Member
 
Join Date: Oct 2001
Posts: 4
Default RE: RE: RE: RE: dumb question

well I doubt so.. anyway I found some better component to accomplish the task therefore I consider this question as answered.

thanks for your help.
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On

Forum Jump


All times are GMT. The time now is 04:48 AM.


Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2019, vBulletin Solutions, Inc.