Documentation component by D.Glodt (c)2003 |
Appendix A: QFileListView |
|
Field |
Type |
R/W |
Default |
|
|
|
|
|
|
Filename |
STRING |
R |
||
File name selected. |
||||
ColumnCaption |
ARRAY(4) OF STRING |
R/W |
||
Column label |
||||
Directory |
STRING |
R/W |
|
|
|
Directory name. |
|||
Mask |
STRING |
R/W |
*.* |
|
File type to view. |
Method |
Type |
Description |
Params |
|
|
|
|
|
|
Refresh |
SUB |
Refresh file list |
0 |
|
SetFocus |
SUB |
Set focus on file list |
0 |
Event |
Type |
Occurs when... |
Params |
|
|
|
|
|
|
OnFileSelect |
(FileName as string) |
On enter keypress or double click, parameter FileName |
1 |
|
OnFileChange |
(FileName as string) |
On selected change in the list, parameter FileName |
1 |
QFileListView Example
$TYPECHECK ON
$INCLUDE
"RAPIDQ.INC"
$INCLUDE
"Object\QFileListView.inc"
declare
sub DirListFileSelect(file
as string)
declare
sub ChangeDirectory
CREATE
Form AS QFORM
Width=500
Height=300
Center
Caption="Exploreur"
CREATE Splitter1 AS
QSPLITTER
Align=alLeft
width=5
END CREATE
CREATE DirTree AS
QDirTree
InitialDir=CURDIR$
Align=alLeft
Width=200
OnChange=ChangeDirectory
END
CREATE
create DirList as
QFileListView
Align=alClient
width=200
ViewStyle=vsReport
OnFileSelect=
DirListFileSelect
ColumnCaption(1)="Name"
'Label column
ColumnCaption(2)="Size"
ColumnCaption(3)="Type"
ColumnCaption(4)="Modified"
Mask="*.*"
end create
end
create
Form.ShowModal
sub
DirListFileSelect(file as
string)
ShowMessage("File"+File+"
was selected.")
end
sub
SUB ChangeDirectory
DirList.Directory =DirTree.Directory
END
SUB