diff --git a/designer/designer.pp b/designer/designer.pp index 27ce6552d3..9daa5bc896 100644 --- a/designer/designer.pp +++ b/designer/designer.pp @@ -1281,7 +1281,18 @@ begin Button:=mbRight; end; else - Button:=mbExtra1; + if (TheMessage.keys and MK_MButton)<>0 then begin + Include(Shift,ssMiddle); + Button:=mbMiddle; + end; + if (TheMessage.keys and MK_RButton)<>0 then begin + Include(Shift,ssRight); + Button:=mbRight; + end; + if (TheMessage.keys and MK_LButton)<>0 then begin + Include(Shift,ssLeft); + Button:=mbLeft; + end; end; case TheMessage.Msg of @@ -1840,7 +1851,7 @@ begin if (ControlSelection.SelectionForm=nil) or (ControlSelection.SelectionForm=Form) then begin - if (TheMessage.keys and MK_LButton) = MK_LButton then begin + if Button=mbLeft then begin // left button pressed if (ControlSelection.ActiveGrabber<>nil) then begin // grabber moving -> size selection diff --git a/examples/designnonlcl/project/unit1.lfm b/examples/designnonlcl/project/unit1.lfm index d90dc26cb0..cfaa2a47ef 100644 --- a/examples/designnonlcl/project/unit1.lfm +++ b/examples/designnonlcl/project/unit1.lfm @@ -1,6 +1,6 @@ object MyForm1: TMyForm1 - Left = 319 - Top = 231 + Left = 329 + Top = 279 Width = 320 Height = 240 Visible = False @@ -14,24 +14,24 @@ object MyForm1: TMyForm1 Caption = 'MyButton1' end object MyButton2: TMyButton - Left = 30 - Top = 70 - Width = 75 + Left = 27 + Top = 68 + Width = 91 Height = 25 Visible = False Caption = 'MyButton2' end object MyGroupBox1: TMyGroupBox - Left = 144 + Left = 139 Top = 65 - Width = 105 + Width = 145 Height = 75 Visible = False Caption = 'MyGroupBox1' object MyGroupBox2: TMyGroupBox - Left = 10 + Left = 14 Top = 10 - Width = 70 + Width = 101 Height = 53 Visible = False Caption = 'MyGroupBox2' diff --git a/examples/designnonlcl/project/unit1.lrs b/examples/designnonlcl/project/unit1.lrs index 6c4a9365d8..fc9eee342d 100644 --- a/examples/designnonlcl/project/unit1.lrs +++ b/examples/designnonlcl/project/unit1.lrs @@ -1,13 +1,13 @@ { This is an automatically generated lazarus resource file } LazarusResources.Add('TMyForm1','FORMDATA',[ - 'TPF0'#8'TMyForm1'#7'MyForm1'#4'Left'#3'?'#1#3'Top'#3#231#0#5'Width'#3'@'#1#6 + 'TPF0'#8'TMyForm1'#7'MyForm1'#4'Left'#3'I'#1#3'Top'#3#23#1#5'Width'#3'@'#1#6 +'Height'#3#240#0#7'Visible'#8#7'Caption'#6#7'MyForm1'#0#9'TMyButton'#9'MyBut' +'ton1'#4'Left'#2#20#3'Top'#2#10#5'Width'#2'K'#6'Height'#2#25#7'Visible'#8#7 - +'Caption'#6#9'MyButton1'#0#0#9'TMyButton'#9'MyButton2'#4'Left'#2#30#3'Top'#2 - +'F'#5'Width'#2'K'#6'Height'#2#25#7'Visible'#8#7'Caption'#6#9'MyButton2'#0#0 - +#11'TMyGroupBox'#11'MyGroupBox1'#4'Left'#3#144#0#3'Top'#2'A'#5'Width'#2'i'#6 - +'Height'#2'K'#7'Visible'#8#7'Caption'#6#11'MyGroupBox1'#0#11'TMyGroupBox'#11 - +'MyGroupBox2'#4'Left'#2#10#3'Top'#2#10#5'Width'#2'F'#6'Height'#2'5'#7'Visibl' - +'e'#8#7'Caption'#6#11'MyGroupBox2'#0#0#0#0 + +'Caption'#6#9'MyButton1'#0#0#9'TMyButton'#9'MyButton2'#4'Left'#2#27#3'Top'#2 + +'D'#5'Width'#2'['#6'Height'#2#25#7'Visible'#8#7'Caption'#6#9'MyButton2'#0#0 + +#11'TMyGroupBox'#11'MyGroupBox1'#4'Left'#3#139#0#3'Top'#2'A'#5'Width'#3#145#0 + +#6'Height'#2'K'#7'Visible'#8#7'Caption'#6#11'MyGroupBox1'#0#11'TMyGroupBox' + +#11'MyGroupBox2'#4'Left'#2#14#3'Top'#2#10#5'Width'#2'e'#6'Height'#2'5'#7'Vis' + +'ible'#8#7'Caption'#6#11'MyGroupBox2'#0#0#0#0 ]);