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

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

?? tflatchecklistboxunit.pas

?? Oracle數據庫備份 寫入日志文件;并附有要使用的控件。
?? PAS
?? 第 1 頁 / 共 2 頁
字號:
  // Draw the down arrow
  y := ClientRect.Bottom - 7;
  if (firstItem + maxItems + 1 <= FItems.Count) and Enabled then
  begin
    canvas.Brush.Color := FArrowColor;
    canvas.Pen.Color := FArrowColor;
    canvas.Polygon([Point(X + 4, Y), Point(X + 8, Y), Point(X + 6, Y + 2)]);
  end
  else
  begin
    canvas.Brush.Color := clWhite;
    canvas.Pen.Color := clWhite;
    Inc(x); Inc(y);
    canvas.Polygon([Point(X + 4, Y), Point(X + 8, Y), Point(X + 6, Y + 2)]);
    Dec(x); Dec(y);
    canvas.Brush.Color := clGray;
    canvas.Pen.Color := clGray;
    canvas.Polygon([Point(X + 4, Y), Point(X + 8, Y), Point(X + 6, Y + 2)]);
  end;
end;

procedure TFlatCheckListBox.DrawCheckRect (canvas: TCanvas; start: TPoint; checked: Boolean);
var
  CheckboxRect: TRect;
begin

  {$IFDEF DFS_COMPILER_4_UP}
  if BidiMode = bdRightToLeft then
    CheckboxRect := Rect(start.x - 14, start.y + 3, start.x - 3, start.y + 14)
  else
    CheckboxRect := Rect(start.x + 3, start.y + 3, start.x + 14, start.y + 14);
  {$ELSE}
  CheckboxRect := Rect(start.x + 3, start.y + 3, start.x + 14, start.y + 14);
  {$ENDIF}

  canvas.pen.style := psSolid;
  canvas.pen.width := 1;
  // Background
  canvas.brush.color := FItemsRectColor;
  canvas.pen.color := FItemsRectColor;

  canvas.FillRect(CheckboxRect);

  // Tick
  if Checked then
  begin
    canvas.pen.color := FCheckColor;

    canvas.penpos := Point(CheckboxRect.left+2, CheckboxRect.top+4);
    canvas.lineto(CheckboxRect.left+6, CheckboxRect.top+8);
    canvas.penpos := Point(CheckboxRect.left+2, CheckboxRect.top+5);
    canvas.lineto(CheckboxRect.left+5, CheckboxRect.top+8);
    canvas.penpos := Point(CheckboxRect.left+2, CheckboxRect.top+6);
    canvas.lineto(CheckboxRect.left+5, CheckboxRect.top+9);
    canvas.penpos := Point(CheckboxRect.left+8, CheckboxRect.top+2);
    canvas.lineto(CheckboxRect.left+4, CheckboxRect.top+6);
    canvas.penpos := Point(CheckboxRect.left+8, CheckboxRect.top+3);
    canvas.lineto(CheckboxRect.left+4, CheckboxRect.top+7);
    canvas.penpos := Point(CheckboxRect.left+8, CheckboxRect.top+4);
    canvas.lineto(CheckboxRect.left+5, CheckboxRect.top+7);
  end;
  // Border
  canvas.brush.color := FBorderColor;
  canvas.FrameRect(CheckboxRect);
end;

procedure TFlatCheckListBox.Paint;
var
  memoryBitmap: TBitmap;
  counterRect, counterItem: Integer;
  itemRect: ^TRect;
  Format: UINT;
begin
  {$IFDEF DFS_COMPILER_4_UP}
  if BidiMode = bdRightToLeft then
    Format := DT_RIGHT or DT_VCENTER or DT_SINGLELINE or DT_NOPREFIX
  else
    Format := DT_LEFT or DT_VCENTER or DT_SINGLELINE or DT_NOPREFIX;
  {$ELSE}
  Format := DT_LEFT or DT_VCENTER or DT_SINGLELINE or DT_NOPREFIX;
  {$ENDIF}

  // create memory-bitmap to draw flicker-free
  memoryBitmap := TBitmap.Create;
  try
    memoryBitmap.Height := ClientRect.Bottom;
    memoryBitmap.Width := ClientRect.Right;
    memoryBitmap.Canvas.Font.Assign(Self.Font);

    // Clear Background
    case FTransparent of
      tmAlways:
        DrawParentImage(Self, memoryBitmap.Canvas);
      tmNone:
        begin
          memoryBitmap.canvas.Brush.Color := FItemsRectColor;
          memoryBitmap.canvas.FillRect(ClientRect);
        end;
      tmNotFocused:
        if Focused then
        begin
          memoryBitmap.canvas.Brush.Color := FItemsRectColor;
          memoryBitmap.canvas.FillRect(ClientRect);
        end
        else
          DrawParentImage(Self, memoryBitmap.Canvas);
    end;

    // Draw Border
    memoryBitmap.canvas.Brush.Color := FBorderColor;
    memoryBitmap.canvas.FrameRect(ClientRect);

    // Draw ScrollBars
    if ScrollBars then
      DrawScrollBar(memoryBitmap.canvas);

    // Initialize the counter for the Items
    counterItem := firstItem;

    // Draw Items
    for counterRect := 0 to maxItems - 1 do
    begin
      itemRect := FItemsRect.Items[counterRect];
      if (counterItem <= FItems.Count - 1) then
      begin
        // Item is selected
        if counterItem = FSelected then
        begin
          // Fill ItemRect
          memoryBitmap.canvas.brush.color := FItemsSelectColor;
          memoryBitmap.canvas.FillRect(itemRect^);
          // Draw ItemBorder
          memoryBitmap.canvas.brush.color := FBorderColor;
          memoryBitmap.canvas.FrameRect(itemRect^);
        end;
        if counterItem in FChecked then
        {$IFDEF DFS_COMPILER_4_UP}
          if BidiMode = bdRightToLeft then
            DrawCheckRect(memoryBitmap.canvas, Point(itemRect^.Right, itemRect^.top), true)
          else
            DrawCheckRect(memoryBitmap.canvas, Point(itemRect^.left, itemRect^.top), true)
          {$ELSE}
          DrawCheckRect(memoryBitmap.canvas, Point(itemRect^.left, itemRect^.top), true)
          {$ENDIF}
        else
          {$IFDEF DFS_COMPILER_4_UP}
          if BidiMode = bdRightToLeft then
            DrawCheckRect(memoryBitmap.canvas, Point(itemRect^.Right, itemRect^.top), false)
          else
            DrawCheckRect(memoryBitmap.canvas, Point(itemRect^.left, itemRect^.top), false);
          {$ELSE}
          DrawCheckRect(memoryBitmap.canvas, Point(itemRect^.left, itemRect^.top), false);
          {$ENDIF}
        // Draw ItemText
        memoryBitmap.canvas.brush.style := bsClear;
        InflateRect(itemRect^, -19, 0);
        if Enabled then
          DrawText(memoryBitmap.canvas.Handle, PChar(FItems[counterItem]), Length(FItems[counterItem]), itemRect^, Format)
        else
          begin
            OffsetRect(itemRect^, 1, 1);
            memoryBitmap.canvas.Font.Color := clBtnHighlight;
            DrawText(memoryBitmap.canvas.Handle, PChar(FItems[counterItem]), Length(FItems[counterItem]), itemRect^, Format);
            OffsetRect(itemRect^, -1, -1);
            memoryBitmap.canvas.Font.Color := clBtnShadow;
            DrawText(memoryBitmap.canvas.Handle, PChar(FItems[counterItem]), Length(FItems[counterItem]), itemRect^, Format);
          end;
        InflateRect(itemRect^, 19, 0);
        Inc(counterItem);
      end;
    end;
    // Copy bitmap to screen
    canvas.CopyRect(ClientRect, memoryBitmap.canvas, ClientRect);
  finally
    // delete the memory bitmap
    memoryBitmap.free;
  end;
end;

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

  if (FItems.Count > 0) and (Button = mbLeft) then
  begin
    for counterRect := 0 to FItemsRect.Count - 1 do
    begin
      currentRect := FItemsRect.Items[counterRect];
      {$IFDEF DFS_COMPILER_4_UP}
      if BidiMode = bdRightToLeft then
        checkRect := Rect(currentRect.right - 14, currentRect.top + 3, currentRect.right - 3, currentRect.Top + 14)
      else
        checkRect := Rect(currentRect.left + 3, currentRect.top + 3, currentRect.left + 14, currentRect.Top + 14);
      {$ELSE}
      checkRect := Rect(currentRect.left + 3, currentRect.top + 3, currentRect.left + 14, currentRect.Top + 14);
      {$ENDIF}
      if PtInRect(checkRect, cursorPos) then
      begin
        if (firstItem + counterRect) in FChecked then
          Exclude(FChecked, firstItem + counterRect)
        else
          Include(FChecked, firstItem + counterRect);
        SetFocus;
        if Assigned(FOnClickCheck) then
          FOnClickCheck(Self);
        Invalidate;
        Exit;
      end
      else
        if PtInRect(currentRect^, cursorPos) then
        begin
          FSelected := firstItem + counterRect;
          SetFocus;
          Invalidate;
          Exit;
        end;
    end;
  end;

  if ScrollBars then
  begin
    if PtInRect(Rect(ClientRect.Left, ClientRect.Top, ClientRect.Right, ClientRect.Top + 11), cursorPos) then
    begin
      if (firstItem - 1) < 0 then
        firstItem := 0
      else
        Dec(firstItem);
      SetFocus;
      Invalidate;
      scrollType := up;
      if ScrollTimer.Enabled then
        ScrollTimer.Enabled := False;
      ScrollTimer.OnTimer := ScrollTimerHandler;
      ScrollTimer.Enabled := True;
    end;
    if PtInRect(Rect(ClientRect.Left, ClientRect.Bottom - 11, ClientRect.Right, ClientRect.Bottom), cursorPos) then
    begin
      if firstItem + maxItems + 1 <= FItems.Count then
        Inc(firstItem);
      SetFocus;
      Invalidate;
      scrollType := down;
      if ScrollTimer.Enabled then
        ScrollTimer.Enabled := False;
      ScrollTimer.OnTimer := ScrollTimerHandler;
      ScrollTimer.Enabled := True;
    end;
  end;
  Inherited;
end;

procedure TFlatCheckListBox.MouseUp (Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
begin
  ScrollTimer.Enabled := False;
  ScrollTimer.Interval := FTimerInterval;
  inherited MouseUp(Button, Shift, X, Y);
end;

procedure TFlatCheckListBox.ScrollTimerHandler (Sender: TObject);
begin
  ScrollTimer.Interval := FScrollSpeed;
  if scrollType = up then
    if (firstItem - 1) < 0 then
    begin
      firstItem := 0;
      ScrollTimer.Enabled := False;
    end
    else
      Dec(firstItem)
  else
    if firstItem + maxItems + 1 <= FItems.Count then
      Inc(firstItem)
    else
      ScrollTimer.Enabled := False;
  Invalidate;
end;

procedure TFlatCheckListBox.Loaded;
begin
  inherited;
  SetItemsRect;
end;

procedure TFlatCheckListBox.WMSize (var Message: TWMSize);
begin
  inherited;
  // Calculate the maximum items to draw
  if ScrollBars then
    maxItems := (Height - 24) div (FItemsHeight + 2)
  else
    maxItems := (Height - 4) div (FItemsHeight + 2);

  // Set the new Bounds
  if ScrollBars then
    SetBounds(Left, Top, Width, maxItems * (FItemsHeight + 2) + 24)
  else
    SetBounds(Left, Top, Width, maxItems * (FItemsHeight + 2) + 4);

  // Recalculate the itemRects
  SetItemsRect;
  if not (FTransparent = tmNone) then
    Invalidate;
end;

procedure TFlatCheckListBox.WMMove (var Message: TWMMove);
begin
  inherited;
  if not (FTransparent = tmNone) then
    Invalidate;
end;

procedure TFlatCheckListBox.CMEnabledChanged (var Message: TMessage);
begin
  inherited;
  Invalidate;
end;

procedure TFlatCheckListBox.CMSysColorChange (var Message: TMessage);
begin
  if FUseAdvColors then
  begin
    ParentColor := True;
    CalcAdvColors;
  end;
  Invalidate;
end;

procedure TFlatCheckListBox.CMParentColorChanged (var Message: TWMNoParams);
begin
  inherited;
  if FUseAdvColors then
  begin
    ParentColor := True;
    CalcAdvColors;
  end;
  Invalidate;
end;

procedure TFlatCheckListBox.Clear;
begin
  FItems.Clear;
  FChecked := FChecked - [0..High(Byte)];
  FSelected := -1;
  Invalidate;
end;

procedure TFlatCheckListBox.SetTransparent (const Value: TTransparentMode);
begin
  FTransparent := Value;
  Invalidate;
end;

procedure TFlatCheckListBox.WMKillFocus (var Message: TWMKillFocus);
begin
  inherited;
  FSelected := -1;
  Invalidate;
end;

procedure TFlatCheckListBox.WMSetFocus (var Message: TWMSetFocus);
begin
  inherited;
  if not (FTransparent = tmNone) then
    Invalidate;
end;

procedure TFlatCheckListBox.CNKeyDown (var Message: TWMKeyDown);
begin
  case Message.CharCode of
    VK_UP: 
      if (firstItem - 1) < 0 then
        firstItem := 0
      else
        Dec(firstItem);
    VK_DOWN:
      if firstItem + maxItems + 1 <= FItems.Count then
        Inc(firstItem);
    VK_PRIOR:
      if (firstItem - maxItems) < 0 then
        firstItem := 0
      else
        Dec(firstItem, maxItems);
    VK_NEXT:
      if firstItem + (maxItems * 2) <= FItems.Count then
        Inc(firstItem, maxItems)
      else
        firstItem := FItems.Count - maxItems;
    VK_SPACE:
      if FSelected in FChecked then
          Exclude(FChecked, FSelected)
        else
          Include(FChecked, FSelected);
  else                                          
    inherited;
  end;
  Invalidate;
end;

function TFlatCheckListBox.GetItemIndex: Integer;
begin
  Result := FSelected;
end;

procedure TFlatCheckListBox.SetItemIndex(Value: Integer);
begin
  if GetItemIndex <> Value then
  begin
    FSelected := Value;
    Invalidate;
  end;
end;

end.

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
精品系列免费在线观看| 欧美一区二区啪啪| 成年人国产精品| 国产乱码精品一区二区三区忘忧草| 精品国产网站在线观看| 欧美日精品一区视频| 欧美一区二区三区免费在线看 | 高清日韩电视剧大全免费| 一区二区在线观看免费视频播放| 日日摸夜夜添夜夜添国产精品| 国产精品夜夜嗨| 国产成人超碰人人澡人人澡| 99久久久无码国产精品| av综合在线播放| 91美女蜜桃在线| 欧美综合天天夜夜久久| 337p亚洲精品色噜噜狠狠| 日韩欧美专区在线| 中文字幕一区二区三中文字幕| 91麻豆免费观看| 欧美精品一区二区三| 亚洲九九爱视频| 高清在线成人网| 日韩欧美精品三级| 亚洲激情六月丁香| 粉嫩aⅴ一区二区三区四区 | 婷婷亚洲久悠悠色悠在线播放| 欧美综合一区二区| 国产精品久久久久久久久搜平片| 欧美日韩国产欧美日美国产精品| 亚洲成a人片在线观看中文| 看片网站欧美日韩| 91精品国产全国免费观看| 亚洲图片自拍偷拍| 91麻豆国产自产在线观看| 日韩免费一区二区三区在线播放| 日韩免费性生活视频播放| 欧美在线综合视频| 亚洲美女一区二区三区| 成人动漫中文字幕| 亚洲欧美自拍偷拍| 色婷婷综合在线| 日韩黄色在线观看| www国产成人| 成人午夜视频在线| 亚洲永久精品大片| 91精品婷婷国产综合久久 | 国产精品夫妻自拍| 欧美三级中文字| 日韩精品久久久久久| 欧美精品1区2区3区| 午夜av区久久| 国产精品久久久久四虎| 制服丝袜激情欧洲亚洲| 国产传媒欧美日韩成人| 亚洲国产精品麻豆| 久久精品无码一区二区三区| 色偷偷88欧美精品久久久| 美国一区二区三区在线播放| 国产精品乱子久久久久| www国产成人| 欧美剧情片在线观看| 91尤物视频在线观看| 蜜臀久久99精品久久久久宅男| 激情欧美一区二区| 亚洲自拍偷拍av| 1区2区3区精品视频| 精品国产电影一区二区| 911精品国产一区二区在线| 91丨porny丨蝌蚪视频| 懂色av一区二区在线播放| 久久国产视频网| 国产精品女上位| 久久精品视频一区二区三区| 精品免费一区二区三区| 日韩丝袜情趣美女图片| 精品日韩在线观看| 久久久精品黄色| 亚洲日本va午夜在线电影| 亚洲丝袜美腿综合| 亚洲mv大片欧洲mv大片精品| 婷婷久久综合九色综合伊人色| aaa欧美色吧激情视频| 色综合天天做天天爱| 成人永久免费视频| 色综合久久久久综合体桃花网| 亚洲日本免费电影| 一区二区欧美精品| 男女男精品网站| 福利一区二区在线观看| 成人免费毛片嘿嘿连载视频| 91成人免费电影| 久久精品夜色噜噜亚洲a∨| **性色生活片久久毛片| 美女脱光内衣内裤视频久久影院| 欧美日韩精品欧美日韩精品| 精品久久国产字幕高潮| 亚洲精品网站在线观看| 久久国产精品99久久久久久老狼| 精品国产凹凸成av人网站| 一区二区在线观看视频| 国产91色综合久久免费分享| 69堂精品视频| 国产精品美女一区二区在线观看| 欧美视频一区二区三区四区| 91精品国产综合久久国产大片| 波多野结衣一区二区三区| 日韩欧美国产一区二区在线播放| 成人av在线播放网址| 日韩精品一区二区三区蜜臀| 天天操天天综合网| 欧美三级韩国三级日本一级| 亚洲久草在线视频| 粉嫩13p一区二区三区| 国产三级一区二区三区| 国产伦精品一区二区三区免费| 日韩精品免费专区| 欧美性做爰猛烈叫床潮| 亚洲一区日韩精品中文字幕| 欧美性生活影院| 免费成人深夜小野草| 久久久久97国产精华液好用吗| 91精品综合久久久久久| 免费三级欧美电影| 国产视频一区二区在线观看| 91在线国内视频| 日韩在线一区二区| 国产午夜一区二区三区| 欧美私人免费视频| 蜜臀91精品一区二区三区| 久久精品男人的天堂| 在线观看亚洲精品视频| 老司机精品视频导航| 亚洲精品欧美激情| xf在线a精品一区二区视频网站| 中文字幕精品在线不卡| 91精品国产综合久久香蕉麻豆| 日韩精品一区二| 欧美在线视频全部完| 国产成人精品在线看| 亚洲成人免费视频| 一区二区三区四区亚洲| 国产亚洲欧美日韩日本| 91传媒视频在线播放| av爱爱亚洲一区| 亚洲天堂av老司机| 亚洲人成在线观看一区二区| 2019国产精品| 99riav一区二区三区| 午夜a成v人精品| 中文字幕色av一区二区三区| 777奇米四色成人影色区| 在线观看日韩高清av| 成人av在线播放网站| 精品一区二区三区欧美| 午夜精品久久一牛影视| 亚洲mv在线观看| 久久99久久99精品免视看婷婷| 欧美无乱码久久久免费午夜一区| 色呦呦国产精品| 国产精品一区二区在线观看不卡 | 欧美顶级少妇做爰| 欧美日韩免费高清一区色橹橹 | 久久久久久99精品| 久久蜜桃一区二区| 亚洲精品国产视频| 亚洲国产精品久久人人爱 | 4hu四虎永久在线影院成人| 日韩一区二区三区免费看| 欧美日韩在线电影| 久久久精品天堂| 亚洲风情在线资源站| av一区二区三区四区| 欧美精品1区2区| 亚洲欧美aⅴ...| 黄色日韩三级电影| 欧美日精品一区视频| 国产三级精品三级| 久久国内精品视频| 欧美中文字幕亚洲一区二区va在线| 日本成人在线一区| 色诱亚洲精品久久久久久| 久久久影视传媒| 日韩精品一卡二卡三卡四卡无卡| 欧美一区日韩一区| 亚洲国产精品尤物yw在线观看| 中文字幕电影一区| 欧美国产日韩精品免费观看| 久久蜜桃av一区二区天堂| 久久综合九色综合欧美98| 国产精品沙发午睡系列990531| 美女精品自拍一二三四| 大陆成人av片| 国产精品视频yy9299一区| 国产福利不卡视频| 国产免费成人在线视频| caoporn国产精品| 欧美成人伊人久久综合网| 韩国成人精品a∨在线观看| 日韩欧美久久一区|