OSDN Git Service

Activating tab when TBottleLogList first added
authornaru <bottle@mikage.to>
Sat, 4 Jan 2003 00:22:42 +0000 (00:22 +0000)
committernaru <bottle@mikage.to>
Sat, 4 Jan 2003 00:22:42 +0000 (00:22 +0000)
bottleclient/LogForm.pas

index f6efe8c..427c09d 100755 (executable)
@@ -144,6 +144,7 @@ procedure TfrmLog.AddCurrentScriptLog(const LogName, Script, Channel, MID, Ghost
 var Sel: integer;
 begin
   BottleLogTitled(LogName).AddScriptLog(Script, Channel, MID, Ghost);
+  if FBottleLogList.Count = 1 then tabBottleLog.TabIndex := 0;
   if SelectedBottleLog <> BottleLogTitled(LogName) then Exit;
   lvwLog.OnChange := nil; //\83C\83x\83\93\83g\94­\90¶(\82¢\82ë\82¢\82ë\8dÄ\95`\89æ\82ª\8bN\82«\82é)\82Ì\97}\90§
   if lvwLog.Selected <> nil then Sel := lvwLog.Selected.Index else Sel := -1;
@@ -162,6 +163,7 @@ procedure TfrmLog.AddCurrentSystemLog(const LogName, MessageString: String);
 var Sel: integer;
 begin
   BottleLogTitled(LogName).AddSystemLog(MessageString);
+  if FBottleLogList.Count = 1 then tabBottleLog.TabIndex := 0;
   if SelectedBottleLog <> BottleLogTitled(LogName) then Exit;
   lvwLog.OnChange := nil;
   if lvwLog.Selected <> nil then Sel := lvwLog.Selected.Index else Sel := -1;