OSDN Git Service

中ボタンクリックでタブを閉じるように
authorYune Kotomi <yune@users.sourceforge.jp>
Mon, 5 Apr 2004 06:24:57 +0000 (06:24 +0000)
committerYune Kotomi <yune@users.sourceforge.jp>
Mon, 5 Apr 2004 06:24:57 +0000 (06:24 +0000)
bottleclient/LogForm.pas

index 10057d2..42a903e 100755 (executable)
@@ -1056,13 +1056,20 @@ procedure TfrmLog.tabBottleLogMouseDown(Sender: TObject;
   Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
 var Index: integer;
 begin
-  with tabBottleLog do begin
-    Index := IndexOfTabAt(X, Y);
-    if Index = -1 then Exit; //\83^\83u\82ª\82È\82¢\82Ì\82Å\83h\83\89\83b\83O\82Å\82«\82È\82¢
-    if Button = mbLeft then begin
-      FDragTabIndex := Index; //\83h\83\89\83b\83O\82·\82é\83^\83u\82Ì\83C\83\93\83f\83b\83N\83X\82ð\95Û\91
-      BeginDrag(False);
-      FDragTabDest := -1;     //\83h\83\89\83b\83O\98g\90ü\95`\89æ\83t\83\89\83O\83N\83\8a\83A\82Ì\82½\82ß
+  if Button = mbMiddle then
+  begin
+    //\92\86\83{\83^\83\93\83N\83\8a\83b\83N\82Å\83^\83u\8dí\8f\9c
+    DoCloseTab(tabBottleLog.IndexOfTabAt(X, Y));
+  end else
+  begin
+    with tabBottleLog do begin
+      Index := IndexOfTabAt(X, Y);
+      if Index = -1 then Exit; //\83^\83u\82ª\82È\82¢\82Ì\82Å\83h\83\89\83b\83O\82Å\82«\82È\82¢
+      if Button = mbLeft then begin
+        FDragTabIndex := Index; //\83h\83\89\83b\83O\82·\82é\83^\83u\82Ì\83C\83\93\83f\83b\83N\83X\82ð\95Û\91
+        BeginDrag(False);
+        FDragTabDest := -1;     //\83h\83\89\83b\83O\98g\90ü\95`\89æ\83t\83\89\83O\83N\83\8a\83A\82Ì\82½\82ß
+      end;
     end;
   end;
 end;