Re: Delphi 4 DirectoryOutline usage
Posted by DelphiLand Team on December 29, 2004
In Reply to: Delphi 4 DirectoryOutline usage posted by mark on December 28, 2004
:
i place the following components on a form:
: a listbox
: a DirectoryOutline
: a label
: in the listbox i place 3 letters, one on each line: A, C and D
: i then write an OnClick handler for the ListBox to associate the selected letter from the listbox with the DirectoryOutline.Drive property, and an OnChange handler for the DirectoryOutline to update the label.caption with the currently selected directory.
: However, the label caption does not get updated, although i can successfully select any drive from
my listbox.
Maybe you made a small mistake somewhere, so maybe compare your code with my code, that has been tested 5 minutes ago: procedure TForm1.ListBox1Click(Sender: TObject);
begin
DirectoryOutline1.Drive :=
Listbox1.Items[Listbox1.ItemIndex][1];
end;
procedure TForm1.DirectoryOutline1Change(Sender: TObject);
begin
Label1.Caption := DirectoryOutline1.Directory;
end;
Regards, Jeff, DelphiLand Team
[ DelphiLand FAQ ] [ Delphi Tutorials -- by DelphiLand ]
|