diff options
-rw-r--r-- | examples/gui/dbtest/test.dbf | bin | 704 -> 704 bytes | |||
-rw-r--r-- | src/gui/gui_dialogs.pas | 15 | ||||
-rw-r--r-- | src/gui/gui_tree.pas | 8 |
3 files changed, 13 insertions, 10 deletions
diff --git a/examples/gui/dbtest/test.dbf b/examples/gui/dbtest/test.dbf Binary files differindex e6945908..38e68f8c 100644 --- a/examples/gui/dbtest/test.dbf +++ b/examples/gui/dbtest/test.dbf diff --git a/src/gui/gui_dialogs.pas b/src/gui/gui_dialogs.pas index b8d2b648..94a388af 100644 --- a/src/gui/gui_dialogs.pas +++ b/src/gui/gui_dialogs.pas @@ -21,9 +21,9 @@ unit gui_dialogs; { TODO: - * Try and abstract the code to remove all IFDEF's + * Try and refactor the code to remove all IFDEF's * Implement MessageDlg with icons and buttons [Work-In-Progress] - * Select Directory dialog + * Select Directory dialog (treeview style) } {.$Define DEBUG} @@ -748,10 +748,13 @@ var e: TFileEntry; begin e := grid.CurrentEntry; - if (e <> nil) and (e.EntryType = etDir) then - begin - SetCurrentDirectory(e.Name); - end; + if (e = nil) then + Exit; //==> + + if (e.EntryType = etDir) then + SetCurrentDirectory(e.Name) + else if (e.EntryType = etFile) then + btnOKClick(Sender); end; procedure TfpgFileDialog.SetFilter(const Value: string); diff --git a/src/gui/gui_tree.pas b/src/gui/gui_tree.pas index 5bd5e686..aef8507d 100644 --- a/src/gui/gui_tree.pas +++ b/src/gui/gui_tree.pas @@ -192,13 +192,13 @@ type property RootNode: TfpgTreeNode read GetRootNode; property Selection: TfpgTreeNode read FSelection write SetSelection; published - property DefaultColumnWidth: word read FDefaultColumnWidth write SetDefaultColumnWidth; + property DefaultColumnWidth: word read FDefaultColumnWidth write SetDefaultColumnWidth default 15; property FontDesc: string read GetFontDesc write SetFontDesc; - property ScrollWheelDelta: integer read FScrollWheelDelta write FScrollWheelDelta; + property ScrollWheelDelta: integer read FScrollWheelDelta write FScrollWheelDelta default 15; property ShowColumns: boolean read FShowColumns write SetShowColumns default False; property ShowImages: boolean read FShowImages write SetShowImages default False; - property TreeLineColor: TfpgColor read FTreeLineColor write SetTreeLineColor; - property TreeLineStyle: TfpgLineStyle read FTreeLineStyle write SetTreeLineStyle; + property TreeLineColor: TfpgColor read FTreeLineColor write SetTreeLineColor default clShadow1; + property TreeLineStyle: TfpgLineStyle read FTreeLineStyle write SetTreeLineStyle default lsDot; property OnChange: TNotifyEvent read FOnChange write FOnChange; property OnExpand: TfpgTreeExpandEvent read FOnExpand write FOnExpand; end; |