From bacb830e284a268055fca300dd67eed3bbf5b802 Mon Sep 17 00:00:00 2001 From: wp_xxyyzz Date: Sat, 27 Apr 2019 22:02:42 +0000 Subject: [PATCH] jvcllaz: Fix compilation of DB packages under Linux. Some fixes in DB-related demos. git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@6875 8e941d3f-bd1b-0410-a28a-d453659cc2b4 --- .../jvcllaz/examples/JvDBLookupTreeView/main.lfm | 5 +++-- components/jvcllaz/examples/JvDBTreeView/main.lfm | 7 ++++--- components/jvcllaz/packages/jvdblazd.lpk | 6 +++--- components/jvcllaz/packages/jvdblazr.lpk | 4 ++-- components/jvcllaz/run/JvDB/jvdblookuptreeview.pas | 13 ++++++++++--- 5 files changed, 22 insertions(+), 13 deletions(-) diff --git a/components/jvcllaz/examples/JvDBLookupTreeView/main.lfm b/components/jvcllaz/examples/JvDBLookupTreeView/main.lfm index fafd77bb7..cc7eb041f 100644 --- a/components/jvcllaz/examples/JvDBLookupTreeView/main.lfm +++ b/components/jvcllaz/examples/JvDBLookupTreeView/main.lfm @@ -84,9 +84,10 @@ object Form1: TForm1 Top = 0 Width = 594 Align = alTop + BevelOuter = bvNone Caption = '(Some) persons in the novel "The Grapes of Wrath" by John Steinbeck' - Color = clBackground - Font.Color = clHighlightText + Color = clBlack + Font.Color = clWhite Font.Height = -16 Font.Style = [fsBold] ParentColor = False diff --git a/components/jvcllaz/examples/JvDBTreeView/main.lfm b/components/jvcllaz/examples/JvDBTreeView/main.lfm index e530d2e39..b5faaa09d 100644 --- a/components/jvcllaz/examples/JvDBTreeView/main.lfm +++ b/components/jvcllaz/examples/JvDBTreeView/main.lfm @@ -12,10 +12,9 @@ object Form1: TForm1 AnchorSideLeft.Control = Owner AnchorSideTop.Control = Owner AnchorSideRight.Control = Bevel1 - AnchorSideBottom.Control = Owner - AnchorSideBottom.Side = asrBottom + AnchorSideBottom.Control = StatusBar1 Left = 0 - Height = 509 + Height = 486 Top = 0 Width = 378 Anchors = [akTop, akLeft, akRight, akBottom] @@ -86,6 +85,8 @@ object Form1: TForm1 TabOrder = 3 object Button1: TButton AnchorSideLeft.Control = Panel1 + AnchorSideBottom.Control = Panel1 + AnchorSideBottom.Side = asrBottom Left = 4 Height = 25 Top = 4 diff --git a/components/jvcllaz/packages/jvdblazd.lpk b/components/jvcllaz/packages/jvdblazd.lpk index e3dff654b..dd6ec6edd 100644 --- a/components/jvcllaz/packages/jvdblazd.lpk +++ b/components/jvcllaz/packages/jvdblazd.lpk @@ -22,14 +22,14 @@ - + - + @@ -38,7 +38,7 @@ - + diff --git a/components/jvcllaz/packages/jvdblazr.lpk b/components/jvcllaz/packages/jvdblazr.lpk index 643f8ecd7..859466197 100644 --- a/components/jvcllaz/packages/jvdblazr.lpk +++ b/components/jvcllaz/packages/jvdblazr.lpk @@ -55,10 +55,10 @@ - + - + diff --git a/components/jvcllaz/run/JvDB/jvdblookuptreeview.pas b/components/jvcllaz/run/JvDB/jvdblookuptreeview.pas index 3748267fe..c21a78a13 100644 --- a/components/jvcllaz/run/JvDB/jvdblookuptreeview.pas +++ b/components/jvcllaz/run/JvDB/jvdblookuptreeview.pas @@ -90,7 +90,7 @@ type FSearchText: string; FLookupMode: Boolean; FListActive: Boolean; - FFocused: Boolean; +// FFocused: Boolean; FSearchTickCount: Integer; FOnKeyValueChange: TNotifyEvent; function CanModify: Boolean; @@ -120,8 +120,10 @@ type procedure SetReadOnly(Value: Boolean); procedure CMGetDataLink(var Msg: TLMessage); message CM_GETDATALINK; protected + { procedure FocusKilled(NextWnd: THandle); override; procedure FocusSet(PrevWnd: THandle); override; + } procedure GetDlgCode(var Code: TDlgCodes); override; procedure Notification(AComponent: TComponent; Operation: TOperation); override; property DataField: string read FDataFieldName write SetDataFieldName; @@ -359,7 +361,9 @@ type procedure SetOnCustomDraw(const Value: TTVCustomDrawEvent); procedure SetOnCustomDrawItem(const Value: TTVCustomDrawItemEvent); protected + { procedure FocusSet({%H-}PrevWnd: THandle); override; + } procedure CreateParams(var Params: TCreateParams); override; procedure ListLinkActiveChanged; override; public @@ -438,7 +442,7 @@ implementation uses Variants, - CommCtrl, Graphics, DBConst, + Graphics, DBConst, JvJclUtils, JvDBConst, JvDBUtils, JvThemes; //=== { TJvLookupDataSourceLink } ============================================ @@ -835,6 +839,7 @@ begin Code := [dcWantArrows, dcWantChars]; end; +{ procedure TJvDBLookupControl.FocusKilled(NextWnd: THandle); begin FFocused := False; @@ -848,7 +853,7 @@ begin inherited FocusSet(PrevWnd); Invalidate; end; - +} procedure TJvDBLookupControl.CMGetDataLink(var Msg: TLMessage); begin Msg.Result := LRESULT(FDataLink); @@ -1569,10 +1574,12 @@ begin end; end; +{ procedure TJvDBLookupTreeView.FocusSet(PrevWnd: THandle); begin FTree.SetFocus; end; +} function TJvDBLookupTreeView.GetShowButtons: Boolean; begin