mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-08 22:58:50 +02:00
OI: added mousewheel handler, so it doesn't depend on the automatic conversion to scroll message, fixes issue #11953
git-svn-id: trunk@16204 -
This commit is contained in:
parent
48d129c846
commit
b6e000dff4
@ -3,8 +3,6 @@ object ObjectInspectorDlg: TObjectInspectorDlg
|
||||
Height = 669
|
||||
Top = 175
|
||||
Width = 275
|
||||
HorzScrollBar.Page = 274
|
||||
VertScrollBar.Page = 668
|
||||
Caption = 'ObjectInspectorDlg'
|
||||
ClientHeight = 669
|
||||
ClientWidth = 275
|
||||
@ -13,8 +11,8 @@ object ObjectInspectorDlg: TObjectInspectorDlg
|
||||
PopupMenu = MainPopupMenu
|
||||
LCLVersion = '0.9.25'
|
||||
object StatusBar: TStatusBar
|
||||
Height = 20
|
||||
Top = 649
|
||||
Height = 23
|
||||
Top = 646
|
||||
Width = 275
|
||||
Panels = <
|
||||
item
|
||||
|
@ -1,15 +1,16 @@
|
||||
{ This is an automatically generated lazarus resource file }
|
||||
|
||||
LazarusResources.Add('TObjectInspectorDlg','FORMDATA',[
|
||||
'TPF0'#19'TObjectInspectorDlg'#18'ObjectInspectorDlg'#4'Left'#3'$'#1#6'Height'
|
||||
+#3#157#2#3'Top'#3#175#0#5'Width'#3#19#1#18'HorzScrollBar.Page'#3#18#1#18'Ver'
|
||||
+'tScrollBar.Page'#3#156#2#7'Caption'#6#18'ObjectInspectorDlg'#12'ClientHeigh'
|
||||
+'t'#3#157#2#11'ClientWidth'#3#19#1#10'KeyPreview'#9#8'OnResize'#7#21'ObjectI'
|
||||
+'nspectorResize'#9'PopupMenu'#7#13'MainPopupMenu'#10'LCLVersion'#6#6'0.9.25'
|
||||
+#0#10'TStatusBar'#9'StatusBar'#6'Height'#2#20#3'Top'#3#137#2#5'Width'#3#19#1
|
||||
+#6'Panels'#14#1#5'Width'#2'd'#0#1#5'Width'#2'2'#0#0#11'SimplePanel'#8#0#0#9
|
||||
+'TComboBox'#23'AvailPersistentComboBox'#6'Height'#2#21#5'Width'#3#19#1#5'Ali'
|
||||
+'gn'#7#5'alTop'#16'AutoCompleteText'#11#22'cbactEndOfLineComplete'#20'cbactS'
|
||||
+'earchAscending'#0#10'ItemHeight'#2#13#9'OnCloseUp'#7#20'AvailComboBoxCloseU'
|
||||
+'p'#5'Style'#7#14'csDropDownList'#8'TabOrder'#2#0#0#0#10'TPopupMenu'#13'Main'
|
||||
+'PopupMenu'#7'OnPopup'#7#20'OnMainPopupMenuPopup'#4'left'#2#9#3'top'#2#11#0#0
|
||||
+#0
|
||||
+#3#157#2#3'Top'#3#175#0#5'Width'#3#19#1#7'Caption'#6#18'ObjectInspectorDlg'
|
||||
+#12'ClientHeight'#3#157#2#11'ClientWidth'#3#19#1#10'KeyPreview'#9#8'OnResize'
|
||||
+#7#21'ObjectInspectorResize'#9'PopupMenu'#7#13'MainPopupMenu'#10'LCLVersion'
|
||||
+#6#6'0.9.25'#0#10'TStatusBar'#9'StatusBar'#6'Height'#2#23#3'Top'#3#134#2#5'W'
|
||||
+'idth'#3#19#1#6'Panels'#14#1#5'Width'#2'd'#0#1#5'Width'#2'2'#0#0#11'SimplePa'
|
||||
+'nel'#8#0#0#9'TComboBox'#23'AvailPersistentComboBox'#6'Height'#2#21#5'Width'
|
||||
+#3#19#1#5'Align'#7#5'alTop'#16'AutoCompleteText'#11#22'cbactEndOfLineComplet'
|
||||
+'e'#20'cbactSearchAscending'#0#10'ItemHeight'#2#13#9'OnCloseUp'#7#20'AvailCo'
|
||||
+'mboBoxCloseUp'#5'Style'#7#14'csDropDownList'#8'TabOrder'#2#0#0#0#10'TPopupM'
|
||||
+'enu'#13'MainPopupMenu'#7'OnPopup'#7#20'OnMainPopupMenuPopup'#4'left'#2#9#3
|
||||
+'top'#2#11#0#0#0
|
||||
]);
|
||||
|
@ -409,6 +409,8 @@ type
|
||||
ARect: TRect; State: TOwnerDrawState);
|
||||
|
||||
procedure WMVScroll(var Msg: TLMScroll); message LM_VSCROLL;
|
||||
procedure WMMouseWheel(var Message: TLMMouseEvent); message
|
||||
LM_MOUSEWHEEL;
|
||||
procedure SetBackgroundColor(const AValue: TColor);
|
||||
procedure SetReferences(const AValue: TColor);
|
||||
procedure SetSubPropertiesColor(const AValue: TColor);
|
||||
@ -1009,6 +1011,19 @@ begin
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TOICustomPropertyGrid.WMMouseWheel(var Message: TLMMouseEvent);
|
||||
begin
|
||||
// -1 : scroll by page
|
||||
if Mouse.WheelScrollLines=-1
|
||||
then TopY := TopY -
|
||||
(Message.WheelDelta * (ClientHeight - DefaultItemHeight)) div 120
|
||||
// scrolling one line -> scroll half an item, see SB_LINEDOWN and SB_LINEUP
|
||||
// handler in WMVScrol
|
||||
else TopY := TopY -
|
||||
(Message.WheelDelta * Mouse.WheelScrollLines*DefaultItemHeight) div 240;
|
||||
Message.Result := 1;
|
||||
end;
|
||||
|
||||
destructor TOICustomPropertyGrid.Destroy;
|
||||
var a:integer;
|
||||
begin
|
||||
|
Loading…
Reference in New Issue
Block a user