From e3e882ce591293ebb10aae62c35b07ad047f18a5 Mon Sep 17 00:00:00 2001 From: wp_xxyyzz Date: Fri, 17 Aug 2018 19:23:49 +0000 Subject: [PATCH] jvcllaz: Add missing properties to the JvXXXXViewer components (issue #0034104, patch by Michal Gawrycki) git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@6608 8e941d3f-bd1b-0410-a28a-d453659cc2b4 --- .../JvCustomControls/JvCustomItemViewer.pas | 25 ++++++++++--------- .../JvCustomControls/JvImageListViewer.pas | 9 +++++++ .../run/JvCustomControls/JvImagesViewer.pas | 9 +++++++ .../JvCustomControls/JvOwnerDrawViewer.pas | 11 ++++++++ 4 files changed, 42 insertions(+), 12 deletions(-) diff --git a/components/jvcllaz/run/JvCustomControls/JvCustomItemViewer.pas b/components/jvcllaz/run/JvCustomControls/JvCustomItemViewer.pas index 2c5097da1..fdea8433f 100644 --- a/components/jvcllaz/run/JvCustomControls/JvCustomItemViewer.pas +++ b/components/jvcllaz/run/JvCustomControls/JvCustomItemViewer.pas @@ -203,7 +203,7 @@ type FOnDrawItem: TJvViewerItemDrawEvent; FDragImages: TDragImageList; FUpdateCount, FCols, FRows, FTempSelected, FSelectedIndex, FLastHotTrack: Integer; - FBorderStyle: TBorderStyle; + //FBorderStyle: TBorderStyle; FTopLeftIndex: Integer; FBottomRightIndex: Integer; FOnScroll: TNotifyEvent; @@ -296,7 +296,7 @@ type property BottomRightIndex: Integer read FBottomRightIndex; property UpdateCount: Integer read FUpdateCount; - property BorderStyle: TBorderStyle read FBorderStyle write SetBorderStyle default bsSingle; + //property BorderStyle: TBorderStyle read FBorderStyle write SetBorderStyle default bsSingle; property ParentColor default False; property SelectedIndex: Integer read FSelectedIndex write SetSelectedIndex; property Selected[Item: TJvViewerItem]: Boolean read GetSelected write SetSelected; @@ -329,6 +329,7 @@ type procedure Delete(Index: Integer); function IndexOf(Item: TJvViewerItem): Integer; function ItemAtPos(X, Y: Integer; Existing: Boolean): Integer; virtual; + property BorderStyle default bsSingle; end; // Creates a 8x8 brush pattern with alternate odd and even colors @@ -823,7 +824,7 @@ begin VertScrollBar.Smooth := Options.Smooth; VertScrollBar.Tracking := Options.Tracking; DoubleBuffered := True; - FBorderStyle := bsSingle; + BorderStyle := bsSingle; Width := 185; Height := 150; TabStop := True; @@ -965,15 +966,15 @@ const BorderStyles: array [TBorderStyle] of DWORD = (0, WS_BORDER); begin inherited CreateParams(Params); - with Params do - begin - Style := Style or BorderStyles[BorderStyle]; - //if Ctl3D and (BorderStyle = bsSingle) then - //begin - // Style := Style and not WS_BORDER; - // ExStyle := ExStyle or WS_EX_CLIENTEDGE; - //end; - end; + //with Params do + //begin + // Style := Style or BorderStyles[BorderStyle]; + // //if Ctl3D and (BorderStyle = bsSingle) then + // //begin + // // Style := Style and not WS_BORDER; + // // ExStyle := ExStyle or WS_EX_CLIENTEDGE; + // //end; + //end; with Params.WindowClass do Style := Style or (CS_HREDRAW or CS_VREDRAW); { or CS_SAVEBITS} end; diff --git a/components/jvcllaz/run/JvCustomControls/JvImageListViewer.pas b/components/jvcllaz/run/JvCustomControls/JvImageListViewer.pas index 0ef8602f1..9811ca9f8 100644 --- a/components/jvcllaz/run/JvCustomControls/JvImageListViewer.pas +++ b/components/jvcllaz/run/JvCustomControls/JvImageListViewer.pas @@ -91,6 +91,8 @@ type property Anchors; // property BiDiMode; property BorderSpacing; + property BorderStyle; + property BorderWidth; property Color; property Constraints; property DockSite; @@ -129,12 +131,19 @@ type property OnMouseDown; property OnMouseMove; property OnMouseUp; + property OnMouseEnter; + property OnMouseLeave; + property OnMouseWheel; + property OnMouseWheelDown; + property OnMouseWheelUp; property OnKeyDown; property OnKeyUp; property OnKeyPress; + property OnResize; property OnStartDock; property OnStartDrag; property OnUnDock; + property OnUTF8KeyPress; end; implementation diff --git a/components/jvcllaz/run/JvCustomControls/JvImagesViewer.pas b/components/jvcllaz/run/JvCustomControls/JvImagesViewer.pas index 2f6def0e8..d69bd1d43 100644 --- a/components/jvcllaz/run/JvCustomControls/JvImagesViewer.pas +++ b/components/jvcllaz/run/JvCustomControls/JvImagesViewer.pas @@ -160,6 +160,8 @@ type property Anchors; // property BiDiMode; property BorderSpacing; + property BorderStyle; + property BorderWidth; property Color; property Constraints; property DockSite; @@ -194,10 +196,17 @@ type property OnMouseDown; property OnMouseMove; property OnMouseUp; + property OnMouseEnter; + property OnMouseLeave; + property OnMouseWheel; + property OnMouseWheelDown; + property OnMouseWheelUp; property OnKeyDown; property OnKeyUp; property OnKeyPress; + property OnResize; property OnStartDrag; + property OnUTF8KeyPress; end; implementation diff --git a/components/jvcllaz/run/JvCustomControls/JvOwnerDrawViewer.pas b/components/jvcllaz/run/JvCustomControls/JvOwnerDrawViewer.pas index 8203149a3..4770f11fe 100644 --- a/components/jvcllaz/run/JvCustomControls/JvOwnerDrawViewer.pas +++ b/components/jvcllaz/run/JvCustomControls/JvOwnerDrawViewer.pas @@ -71,11 +71,15 @@ type property OnItemChanging; property OnItemChanged; property OnItemHint; + property OnDeletion; + property OnInsertion; property Align; property Anchors; // property BiDiMode; property BorderSpacing; + property BorderStyle; + property BorderWidth; property Color; property Constraints; property DockSite; @@ -108,12 +112,19 @@ type property OnMouseDown; property OnMouseMove; property OnMouseUp; + property OnMouseEnter; + property OnMouseLeave; + property OnMouseWheel; + property OnMouseWheelDown; + property OnMouseWheelUp; property OnKeyDown; property OnKeyUp; property OnKeyPress; + property OnResize; property OnStartDock; property OnStartDrag; property OnUnDock; + property OnUTF8KeyPress; end; implementation