亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? tflattabcontrolunit.pas

?? 工程管理部門配件倉庫屬于生產輔助倉庫
?? PAS
?? 第 1 頁 / 共 2 頁
字號:
end;

procedure TFlatTabControl.SetTabs (Value: TStrings);
var
  counter: Integer;
begin
  FTabs.Assign(Value);
  if FTabs.Count = 0 then // no tabs? then active tab = 0
    FActiveTab := 0
  else
    begin
      if (FTabs.Count - 1) < FActiveTab then // if activeTab > last-tab the activeTab = last-tab
        FActiveTab := FTabs.Count - 1;
      for counter := 0 to FTabs.Count - 1 do
        FTabs[counter] := Trim(FTabs[counter]); // delete all spaces at left and right
    end;
  SetTabRect;
  Invalidate;
end;

procedure TFlatTabControl.SetTabHeight (Value: Integer);
begin
  if Value < 0 then Value := 0; // TabHeigh can't negative
  FTabHeight := Value;
  SetTabRect;
  Invalidate;
end;

procedure TFlatTabControl.SetTabSpacing (Value: Integer);
begin
  if Value < 1 then Value := 1; // minimal tabspacing = 1 dot
  FTabSpacing := Value;
  SetTabRect;
  Invalidate;
end;

procedure TFlatTabControl.SetTabRect;
var
  TabCount: Integer;
  TabRect: ^TRect;
  position: TPoint;
  CaptionTextWidth: Integer;
  CaptionTextString: string;
begin
  // set the font and clear the tab-rect-list
  canvas.font := self.font;
  FTabsRect.Clear;

  // set left/top position for the the first tab
  case FTabPosition of
    tpTop:
      position := Point(ClientRect.left, ClientRect.top);
    tpBottom:
      position := Point(ClientRect.left, ClientRect.bottom - FTabHeight);
  end;

  for TabCount := 0 to (FTabs.Count - 1) do
  begin
    New(TabRect); // create a new Tab-Rect
    if Pos('&', FTabs[TabCount]) <> 0 then // if & in an caption
    begin
      CaptionTextString := FTabs[TabCount]; // read the caption text
      Delete(CaptionTextString, Pos('&', FTabs[TabCount]), 1); // delete the &
      CaptionTextWidth := canvas.TextWidth(CaptionTextString); // calc the caption-width withou the &
    end
    else // else calc the caption-width
      CaptionTextWidth := canvas.TextWidth(FTabs[TabCount]);
    case FTabPosition of // set the rect
      tpTop:
        TabRect^ := Rect(position.x, position.y, position.x + CaptionTextWidth + 20, FTabHeight);
      tpBottom:
        TabRect^ := Rect(position.x, position.y, position.x + CaptionTextWidth + 20, position.y + FTabHeight);
    end;
    position := Point(position.x + CaptionTextWidth + 20 + FTabSpacing, position.y); // set left/top position for next rect
    FTabsRect.Add(TabRect); // add the tab-rect to the tab-rect-list
  end;
end;

procedure TFlatTabControl.CMDialogChar (var Message: TCMDialogChar);
var
  currentTab: Integer;
begin
  with Message do
  begin
    if FTabs.Count > 0 then
    begin
      for currentTab := 0 to FTabs.Count - 1 do
      begin
        if IsAccel(CharCode, FTabs[currentTab]) then
        begin
          if (FActiveTab <> currentTab) then
          begin
            SetActiveTab(currentTab);
            SetFocus;
          end;
          Result := 1; 
          break;
        end;
      end;
    end
    else
      inherited;
  end;
end;

procedure TFlatTabControl.Paint;
var
  abc: TBitmap;
  TabCount: Integer;
  TempRect: ^TRect;
begin
  abc := TBitmap.Create; // create memory-bitmap to draw flicker-free
  try
    abc.Height := ClientRect.Bottom;
    abc.Width := ClientRect.Right;
    abc.Canvas.Font := Self.Font;

    // Clear Background
    abc.canvas.Brush.Color := TForm(Parent).Color;
    abc.canvas.FillRect(ClientRect);

    // Draw Border
    if FTabs.Count = 0 then
    begin
      abc.canvas.Brush.Color := FBorderColor;
      abc.canvas.FrameRect(ClientRect)
    end
    else
    begin
      abc.canvas.Pen.Color := FBorderColor;
      TempRect := FTabsRect.Items[FActiveTab];
      if ClientRect.left <> TempRect^.left then // if Active Tab not first tab then __|Tab|___
      begin
        case FTabPosition of
          tpTop:
          begin
            abc.Canvas.Polyline([Point(ClientRect.left, ClientRect.top + FTabHeight), Point(TempRect^.Left, ClientRect.top + FTabHeight)]);
            abc.Canvas.Polyline([Point(TempRect^.Right-1, ClientRect.top + FTabHeight), Point(ClientRect.right, ClientRect.top + FTabHeight)]);
          end;
          tpBottom:
          begin
            abc.Canvas.Polyline([Point(ClientRect.left, ClientRect.bottom - FTabHeight - 1), Point(TempRect^.Left, ClientRect.bottom - FTabHeight - 1)]);
            abc.Canvas.Polyline([Point(TempRect^.Right-1, ClientRect.bottom - FTabHeight - 1), Point(ClientRect.right, ClientRect.bottom - FTabHeight - 1)]);
          end;
        end;
      end
      else // else |Tab|___
        case FTabPosition of
          tpTop:
            abc.Canvas.Polyline([Point(TempRect^.Right-1, ClientRect.top + FTabHeight), Point(ClientRect.right, ClientRect.top + FTabHeight)]);
          tpBottom:
            abc.Canvas.Polyline([Point(TempRect^.Right-1, ClientRect.bottom - FTabHeight - 1), Point(ClientRect.right, ClientRect.bottom - FTabHeight - 1)]);
        end;
      // border of the control
      case FTabPosition of
        tpTop:
          abc.Canvas.Polyline([Point(ClientRect.left, ClientRect.top + FTabHeight), Point(ClientRect.left, ClientRect.bottom - 1), Point(ClientRect.right - 1, ClientRect.bottom - 1), Point(ClientRect.right - 1, ClientRect.top + FTabHeight)]);
        tpBottom:
          abc.Canvas.Polyline([Point(ClientRect.left, ClientRect.bottom - FTabHeight - 1), Point(ClientRect.left, ClientRect.top), Point(ClientRect.right - 1, ClientRect.top), Point(ClientRect.right - 1, ClientRect.bottom - FTabHeight - 1)]);
      end;
    end;

    case FTabPosition of
      tpTop:
        begin
          abc.canvas.brush.color := Color;
          abc.Canvas.FillRect(Rect(ClientRect.left + 1, ClientRect.top + FTabHeight + 1, ClientRect.right - 1, ClientRect.bottom - 1));
        end;
      tpBottom:
        begin
          abc.canvas.brush.color := Color;
          abc.Canvas.FillRect(Rect(ClientRect.left + 1, ClientRect.top + 1, ClientRect.right - 1, ClientRect.bottom - FTabHeight - 1));
        end;
    end;

    // Draw Tabs
    for TabCount := 0 to FTabs.Count - 1 do
    begin
      TempRect := FTabsRect.Items[TabCount];
      abc.canvas.brush.style := bsclear;
      abc.canvas.pen.color := clBlack;
      if TabCount = FActiveTab then // if Active Tab not first tab then draw border |^^^|
      begin
        abc.canvas.font.color := self.font.color;
        abc.canvas.brush.color := Color;
        abc.canvas.pen.color := FBorderColor;
        case FTabPosition of
          tpTop:
            begin
              abc.Canvas.FillRect(Rect(TempRect^.left, TempRect^.top, TempRect^.right - 1, TempRect^.bottom + 1));
              abc.Canvas.Polyline([Point(TempRect^.Left, TempRect^.Bottom), Point(TempRect^.Left, TempRect^.Top), Point(TempRect^.Right-1, TempRect^.Top), Point(TempRect^.Right-1, TempRect^.Bottom)]);
            end;
          tpBottom:
            begin
              abc.Canvas.FillRect(Rect(TempRect^.left, TempRect^.top - 1, TempRect^.right - 1, TempRect^.bottom));
              abc.Canvas.Polyline([Point(TempRect^.Left, TempRect^.top - 1), Point(TempRect^.Left, TempRect^.bottom - 1), Point(TempRect^.Right-1, TempRect^.bottom - 1), Point(TempRect^.Right-1, TempRect^.top - 1)]);
            end;
        end;
      end
      else // else only fill the tab
      begin
        abc.canvas.font.color := color;
        abc.canvas.brush.color := FUnselectedColor;
        abc.Canvas.FillRect(TempRect^);
      end;
      if (TabCount = FActiveTab) and not Enabled then
       begin
        abc.Canvas.Font.Color := FUnselectedColor;
        DrawText(abc.canvas.Handle, PChar(FTabs[TabCount]), Length(FTabs[TabCount]), TempRect^, DT_CENTER or DT_VCENTER or DT_SINGLELINE)
       end
      else
        DrawText(abc.canvas.Handle, PChar(FTabs[TabCount]), Length(FTabs[TabCount]), TempRect^, DT_CENTER or DT_VCENTER or DT_SINGLELINE);
    end;
    canvas.CopyRect(ClientRect, abc.canvas, ClientRect); // Copy bitmap to screen
  finally
    abc.free; // delete the bitmap
  end;
end;

procedure TFlatTabControl.MouseDown (Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
var
  cursorPos: TPoint;
  currentTab: Integer;
  currentRect: ^TRect;
begin
  GetCursorPos(cursorPos);
  cursorPos := ScreenToClient(cursorPos);

  if FTabs.Count > 0 then
  begin
    for currentTab := 0 to FTabs.Count - 1 do
    begin
      currentRect := FTabsRect.Items[currentTab];
      if PtInRect(currentRect^, cursorPos) then
        if (FActiveTab <> currentTab) then // only change when new tab selected
        begin
          SetActiveTab(currentTab);
          SetFocus;
        end;
    end;
  end;
  inherited;
end;

end.

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
一本大道久久a久久精品综合| 美女视频免费一区| 97精品久久久午夜一区二区三区 | 精品88久久久久88久久久| 欧美96一区二区免费视频| 日韩手机在线导航| 狠狠狠色丁香婷婷综合久久五月| 精品久久久三级丝袜| 国产激情91久久精品导航| 国产精品―色哟哟| 欧美中文字幕久久| 男人的天堂亚洲一区| 国产香蕉久久精品综合网| av福利精品导航| 午夜精品久久久| 久久久久久久久久久久久夜| 成a人片亚洲日本久久| 亚洲综合免费观看高清在线观看| 这里只有精品免费| 国产一区二区中文字幕| 综合自拍亚洲综合图不卡区| 欧美偷拍一区二区| 国精产品一区一区三区mba视频| 国产精品视频你懂的| 欧洲av一区二区嗯嗯嗯啊| 蜜臀av一区二区| 亚洲日本在线天堂| 精品久久国产97色综合| 色哦色哦哦色天天综合| 国内精品视频666| 亚洲你懂的在线视频| 日韩亚洲欧美高清| 99精品国产99久久久久久白柏| 日本强好片久久久久久aaa| 欧美激情在线观看视频免费| 欧美人妇做爰xxxⅹ性高电影| 国产成人精品免费看| 亚洲第一搞黄网站| 国产精品污污网站在线观看| 欧美久久久一区| av不卡一区二区三区| 免费观看在线综合色| 亚洲精品欧美综合四区| 国产人成亚洲第一网站在线播放| 欧美日韩亚洲综合在线| 成年人国产精品| 国产一区二区三区免费在线观看| 夜夜嗨av一区二区三区中文字幕| 精品国精品国产| 欧美无砖砖区免费| 91啪九色porn原创视频在线观看| 精品一区二区三区免费毛片爱| 亚洲精品少妇30p| 国产精品亲子伦对白| 欧美r级在线观看| 91精品国产麻豆国产自产在线| 91麻豆福利精品推荐| 粉嫩绯色av一区二区在线观看| 日本免费在线视频不卡一不卡二| 亚洲久草在线视频| 亚洲色欲色欲www在线观看| 中文字幕成人av| 久久伊99综合婷婷久久伊| 91精品国产丝袜白色高跟鞋| 色88888久久久久久影院按摩| jizzjizzjizz欧美| 不卡一区二区三区四区| 成人在线视频一区二区| 国产乱一区二区| 国产美女主播视频一区| 另类欧美日韩国产在线| 日本欧美久久久久免费播放网| 亚洲一区二区影院| 一区二区三区91| 一区二区三区资源| 亚洲激情av在线| 一级做a爱片久久| 亚洲精品乱码久久久久| 亚洲欧美日韩一区| 一区二区在线看| 一区二区三区国产精华| 一区二区三区四区蜜桃| 一二三四社区欧美黄| 亚洲成va人在线观看| 亚洲国产一区二区在线播放| 午夜免费久久看| 免费在线观看日韩欧美| 国产曰批免费观看久久久| 国内精品嫩模私拍在线| 国产成人午夜高潮毛片| 成人高清在线视频| 在线观看一区二区精品视频| 欧美日韩成人在线| 精品对白一区国产伦| 欧美激情中文不卡| 一区二区三区中文在线观看| 午夜精品一区二区三区电影天堂 | 日韩天堂在线观看| 日韩欧美卡一卡二| 国产欧美日韩另类视频免费观看 | 国产午夜精品在线观看| 国产精品拍天天在线| 亚洲一区在线看| 蜜臀av国产精品久久久久| 国产成人亚洲综合a∨猫咪| voyeur盗摄精品| 欧美人与z0zoxxxx视频| 久久日一线二线三线suv| 国产精品久久久久影院亚瑟| 亚洲一二三四区不卡| 日韩黄色在线观看| 成人手机电影网| 欧美日韩免费视频| 久久久久久毛片| 亚洲伊人伊色伊影伊综合网| 免费观看30秒视频久久| 丁香六月综合激情| 91精品国产综合久久久蜜臀图片| 久久久精品黄色| 亚洲高清不卡在线观看| 国内成人免费视频| 欧美午夜电影网| 国产视频911| 午夜视频在线观看一区二区三区| 国产一区二区伦理片| 在线精品视频小说1| 久久久精品日韩欧美| 亚洲国产一区二区三区| 国产成人精品一区二区三区网站观看 | 精品成人佐山爱一区二区| 亚洲精品欧美二区三区中文字幕| 久久国产乱子精品免费女| 91麻豆国产在线观看| 久久综合国产精品| 性久久久久久久久| 91在线观看免费视频| 日韩免费性生活视频播放| 一区二区三区自拍| 成人性生交大片免费| 欧美成人福利视频| 亚洲3atv精品一区二区三区| 99热精品国产| 国产欧美在线观看一区| 九九国产精品视频| 91麻豆精品国产自产在线| 亚洲色图一区二区| 成人网在线播放| 日韩欧美资源站| 亚洲国产中文字幕在线视频综合| 国产98色在线|日韩| 26uuu色噜噜精品一区二区| 午夜电影久久久| 欧美亚洲国产一区二区三区| 国产精品乱人伦中文| 国产黑丝在线一区二区三区| 欧美一二三区在线观看| 亚洲国产婷婷综合在线精品| 日本久久精品电影| 一区二区三区中文字幕| 91影视在线播放| 亚洲欧美综合网| www.在线欧美| 国产精品视频线看| 99精品视频中文字幕| 国产精品三级电影| 国产白丝精品91爽爽久久| www国产精品av| 国内成人免费视频| 久久色.com| 国产69精品一区二区亚洲孕妇| 久久久久久影视| 国产成人夜色高潮福利影视| 久久久久久久久久久黄色| 国产精品羞羞答答xxdd| 国产视频一区在线观看| 成人开心网精品视频| 成人欧美一区二区三区视频网页| av中文字幕不卡| 亚洲精品国久久99热| 欧美午夜不卡视频| 免费在线成人网| 精品不卡在线视频| 成人v精品蜜桃久久一区| 国产精品久久精品日日| 在线免费不卡视频| 亚洲一二三专区| 欧美一区二区三区在线| 久久国产夜色精品鲁鲁99| 欧美极品美女视频| 色噜噜偷拍精品综合在线| 日韩主播视频在线| 久久久亚洲高清| 99久久精品国产精品久久| 一区二区三区不卡视频| 日韩欧美卡一卡二| 国产成人精品免费视频网站| 亚洲欧美激情在线| 欧美一区二区免费观在线| 国产精品一卡二| 夜夜揉揉日日人人青青一国产精品|