| 1 | Unit ChooseFolderFormUnit;
|
|---|
| 2 |
|
|---|
| 3 | // NewView - a new OS/2 Help Viewer
|
|---|
| 4 | // Copyright 2003 Aaron Lawrence (aaronl at consultant dot com)
|
|---|
| 5 | // This software is released under the Gnu Public License - see readme.txt
|
|---|
| 6 |
|
|---|
| 7 | Interface
|
|---|
| 8 |
|
|---|
| 9 | Uses
|
|---|
| 10 | Classes, Forms, Graphics, Buttons, CustomFileControls, StdCtrls;
|
|---|
| 11 |
|
|---|
| 12 | Type
|
|---|
| 13 | TChooseFolderForm = Class (TForm)
|
|---|
| 14 | CancelButton: TButton;
|
|---|
| 15 | OKButton: TButton;
|
|---|
| 16 | DriveComboBox: TCustomDriveComboBox;
|
|---|
| 17 | Label1: TLabel;
|
|---|
| 18 | DirectoryListBox: TCustomDirectoryListBox;
|
|---|
| 19 | Label2: TLabel;
|
|---|
| 20 | Procedure ChooseFolderFormOnShow (Sender: TObject);
|
|---|
| 21 | Procedure OKButtonOnClick (Sender: TObject);
|
|---|
| 22 | Procedure DriveComboBoxOnChange (Sender: TObject);
|
|---|
| 23 | Private
|
|---|
| 24 | {Insert private declarations here}
|
|---|
| 25 | Public
|
|---|
| 26 | {Insert public declarations here}
|
|---|
| 27 | Folder: string;
|
|---|
| 28 | End;
|
|---|
| 29 |
|
|---|
| 30 | Var
|
|---|
| 31 | ChooseFolderForm: TChooseFolderForm;
|
|---|
| 32 |
|
|---|
| 33 | Implementation
|
|---|
| 34 |
|
|---|
| 35 | Procedure TChooseFolderForm.ChooseFolderFormOnShow (Sender: TObject);
|
|---|
| 36 | Begin
|
|---|
| 37 | DirectoryListBox.Directory := Folder;
|
|---|
| 38 | End;
|
|---|
| 39 |
|
|---|
| 40 | Procedure TChooseFolderForm.OKButtonOnClick (Sender: TObject);
|
|---|
| 41 | Begin
|
|---|
| 42 | Folder := DirectoryListBox.Directory;
|
|---|
| 43 | End;
|
|---|
| 44 |
|
|---|
| 45 | Procedure TChooseFolderForm.DriveComboBoxOnChange (Sender: TObject);
|
|---|
| 46 | Begin
|
|---|
| 47 |
|
|---|
| 48 | End;
|
|---|
| 49 |
|
|---|
| 50 | Initialization
|
|---|
| 51 | RegisterClasses ([TChooseFolderForm, TButton, TCustomDriveComboBox, TLabel,
|
|---|
| 52 | TCustomDirectoryListBox]);
|
|---|
| 53 | End.
|
|---|