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

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

?? tflatlistboxunit.pas

?? 貨代程序
?? PAS
?? 第 1 頁 / 共 2 頁
字號:
  canvas.Brush.Color := Color;
  canvas.FillRect(Rect(ClientRect.Left, ClientRect.Top, ClientRect.Right, ClientRect.Top + 11));
  canvas.FillRect(Rect(ClientRect.Left, ClientRect.Bottom - 11, ClientRect.Right, ClientRect.Bottom));

  // Draw the ScrollBar border
  canvas.Brush.Color := FBorderColor;
  canvas.FrameRect(Rect(ClientRect.Left, ClientRect.Top, ClientRect.Right, ClientRect.Top + 11));
  canvas.FrameRect(Rect(ClientRect.Left, ClientRect.Bottom - 11, ClientRect.Right, ClientRect.Bottom));

  // Draw the up arrow
  x := (ClientRect.Right - ClientRect.Left) div 2 - 6;
  y := ClientRect.Top + 4;

  if (firstItem <> 0) and Enabled then
  begin
    canvas.Brush.Color := FArrowColor;
    canvas.Pen.Color := FArrowColor;
    canvas.Polygon([Point(x + 4, y + 2), Point(x + 8, y + 2), Point(x + 6, y)]);
  end
  else
  begin
    canvas.Brush.Color := clWhite;
    canvas.Pen.Color := clWhite;
    Inc(x); Inc(y);
    canvas.Polygon([Point(x + 4, y + 2), Point(x + 8, y + 2), Point(x + 6, y)]);
    Dec(x); Dec(y);
    canvas.Brush.Color := clGray;
    canvas.Pen.Color := clGray;
    canvas.Polygon([Point(x + 4, y + 2), Point(x + 8, y + 2), Point(x + 6, y)]);
  end;

  // 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 TFlatListBox.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 in 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;
        // Draw ItemText
        memoryBitmap.canvas.brush.style := bsClear;
        InflateRect(itemRect^, -3, 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^, 3, 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 TFlatListBox.MouseDown (Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
var
  cursorPos: TPoint;
  counterRect: Integer;
  currentRect: ^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];
      if PtInRect(currentRect^, cursorPos) then
      begin
        if MultiSelect then
        begin
          if (firstItem + counterRect) in FSelected then
            Exclude(FSelected, firstItem + counterRect)
          else
            Include(FSelected, firstItem + counterRect);
          FItemIndex := firstItem + counterRect;
        end
        else
        begin
          FSelected := FSelected - [0..High(Byte)];
          Include(FSelected, firstItem + counterRect);
          FItemIndex := firstItem + counterRect;
        end;
        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 TFlatListBox.MouseUp (Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
begin
  ScrollTimer.Enabled := False;
  ScrollTimer.Interval := FTimerInterval;
  inherited MouseUp(Button, Shift, X, Y);
end;

procedure TFlatListBox.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 TFlatListBox.Loaded;
begin
  inherited;
  SetItemsRect;
end;

procedure TFlatListBox.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;
end;

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

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

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

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

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

procedure TFlatListBox.WMKillFocus (var Message: TWMKillFocus);
begin
  inherited;
  if not (FTransparent = tmNone) then
    Invalidate;
end;

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

procedure TFlatListBox.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;
  else
    inherited;
  end;
  Invalidate;
end;

function TFlatListBox.GetItemIndex: Integer;
begin
  Result := FItemIndex;
end;

procedure TFlatListBox.SetItemIndex (Value: Integer);
begin
  if GetItemIndex <> Value then
  begin
    FItemIndex := Value;
    if MultiSelect then
    begin
      if (Value) in FSelected then
        Exclude(FSelected, Value)
      else
        Include(FSelected, Value);
    end
    else
    begin
      FSelected := FSelected - [0..High(Byte)];
      Include(FSelected, Value);
    end;
    Invalidate;
  end;
end;

procedure TFlatListBox.SetMultiSelect (Value: Boolean);
begin
  FMultiSelect := Value;
  if Value then
    FItemIndex := 0;
end;

{$IFDEF DFS_COMPILER_4_UP}
procedure TFlatListBox.SetBiDiMode(Value: TBiDiMode);
begin
  inherited;
  Invalidate;
end;
{$ENDIF}

end.

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
中文字幕一区二区三区视频| 国产一区二区三区在线观看免费 | 制服.丝袜.亚洲.另类.中文| 亚洲成人综合网站| 91精品国产综合久久婷婷香蕉 | 在线观看成人小视频| 国产精品欧美经典| 成人免费视频一区| 日本一区免费视频| 性久久久久久久| 欧美亚一区二区| 亚洲国产日韩av| 777xxx欧美| 美女任你摸久久| 日韩一级二级三级| 精品一区二区三区久久久| 精品捆绑美女sm三区| 日本视频在线一区| 精品国产凹凸成av人导航| 韩国一区二区三区| 日本一区免费视频| 色综合天天综合色综合av | 欧美人体做爰大胆视频| 爽好多水快深点欧美视频| 欧美在线视频全部完| 日韩avvvv在线播放| 久久综合九色综合欧美亚洲| 国产精品中文有码| 亚洲三级在线观看| 欧美日韩的一区二区| 麻豆国产91在线播放| 精品国产成人在线影院 | 欧美成人a∨高清免费观看| 紧缚奴在线一区二区三区| 日本一区二区三区在线不卡| 91视频在线看| 图片区小说区国产精品视频| 久久女同精品一区二区| 99re热这里只有精品视频| 亚洲成人免费在线| 久久精品人人爽人人爽| 色综合天天综合网天天狠天天| 婷婷久久综合九色综合伊人色| 日韩三级免费观看| 成人在线视频一区二区| 亚洲高清久久久| 欧美国产精品一区二区三区| 欧美中文一区二区三区| 国产99久久精品| 日本不卡一区二区三区高清视频| 国产日韩欧美精品综合| 成人免费毛片嘿嘿连载视频| 亚洲一区二区在线视频| 久久精品欧美日韩精品 | 亚洲欧美视频一区| 日韩精品一区二区三区视频 | 国产一区二区三区视频在线播放 | 国产精品不卡在线观看| 欧美日韩国产电影| 99精品在线观看视频| 麻豆视频一区二区| 亚洲综合一区二区精品导航| 国产午夜精品美女毛片视频| 欧美日韩1234| 色综合久久综合网欧美综合网| 久久国产精品色婷婷| 亚洲成人一区在线| 亚洲欧洲日韩在线| 久久精品一区二区三区不卡 | 亚洲美女一区二区三区| 久久新电视剧免费观看| 6080yy午夜一二三区久久| 99国产精品一区| 午夜视频在线观看一区二区三区| 国产精品国产三级国产普通话三级 | caoporn国产一区二区| 久久精品99国产精品日本| 亚洲国产一区二区三区青草影视| 中文字幕一区在线观看| 国产日韩欧美电影| 2020国产成人综合网| 日韩一区二区不卡| 欧美日韩高清影院| 日本乱码高清不卡字幕| 91网址在线看| 91色婷婷久久久久合中文| 国产成人av一区二区三区在线观看| 日本免费在线视频不卡一不卡二 | 日本韩国视频一区二区| 成人18精品视频| k8久久久一区二区三区| 国产a视频精品免费观看| 国产成人在线网站| 国产99精品国产| eeuss影院一区二区三区| 成人高清伦理免费影院在线观看| 国产suv精品一区二区三区| 国产风韵犹存在线视精品| 国产精品99久久久久久似苏梦涵| 精品一区二区三区日韩| 国产一区二区三区美女| 国产一区亚洲一区| 成人综合婷婷国产精品久久| 成人午夜电影网站| 99久久99久久精品国产片果冻 | 日本欧美在线看| 麻豆国产精品一区二区三区 | 91精品国产91久久久久久一区二区| 欧美在线视频日韩| 欧美日韩亚洲高清一区二区| 91精品国产综合久久精品app | 99精品偷自拍| 欧美午夜寂寞影院| 欧美一区二区三区婷婷月色| 亚洲精品在线电影| 国产精品无圣光一区二区| 亚洲欧美区自拍先锋| 亚洲v日本v欧美v久久精品| 久草精品在线观看| 91免费视频观看| 欧美日韩国产小视频在线观看| 欧美一区二区在线免费观看| 久久久91精品国产一区二区精品 | 欧美丝袜第三区| 91精品国产麻豆国产自产在线| 精品国产乱码久久久久久免费| 国产精品久久久久影院亚瑟 | 成人精品一区二区三区四区| 91电影在线观看| 日韩欧美不卡在线观看视频| 综合欧美亚洲日本| 亚洲成av人综合在线观看| 亚洲精品成人在线| 久久精品国产亚洲高清剧情介绍| 国产精品一区二区久久精品爱涩| 欧美在线免费观看视频| 亚洲精品一区二区三区精华液 | 亚洲午夜视频在线观看| 国产一区二区在线观看免费 | 日本美女一区二区三区视频| 成人综合日日夜夜| 日韩一区二区三区免费观看| 久久久久久久av麻豆果冻| 一区二区三区国产| 成人一级片网址| 欧美日韩精品系列| 中文字幕一区在线观看视频| 亚洲成av人片观看| 在线观看日韩毛片| 国产精品午夜在线观看| 亚洲免费观看高清完整版在线观看| 午夜精品久久久久| 国产高清精品在线| 日韩一区二区三区三四区视频在线观看 | 精品在线免费视频| 欧美日韩精品一区二区三区四区| 国产精品电影一区二区| 日本丶国产丶欧美色综合| 日本丶国产丶欧美色综合| 国产日韩精品一区二区三区在线| 丝袜亚洲另类欧美| 在线欧美日韩精品| 国产精品久久久一本精品| 狠狠色丁香久久婷婷综合丁香| 欧美日韩精品免费| 一区二区欧美在线观看| av亚洲精华国产精华| 久久久久国产精品麻豆ai换脸| 亚洲va韩国va欧美va精品| 色综合天天综合网国产成人综合天 | 丝袜亚洲另类丝袜在线| 色综合天天综合给合国产| 国产日产欧美一区二区三区| 精品一二线国产| 日韩三级视频中文字幕| 日韩有码一区二区三区| 99视频一区二区| 国产精品国产三级国产aⅴ中文| 国产精品99久久久久久似苏梦涵| 久久久噜噜噜久久人人看| 麻豆精品精品国产自在97香蕉| 欧美伊人久久大香线蕉综合69 | 亚洲国产精品成人综合色在线婷婷| 裸体一区二区三区| 欧美日韩国产在线播放网站| 亚洲第四色夜色| 欧美亚洲日本一区| 免费成人av在线| 4438x亚洲最大成人网| 免费欧美在线视频| 日韩精品一区二区三区老鸭窝| 亚洲专区一二三| 在线观看欧美日本| 亚洲国产欧美另类丝袜| 日韩免费观看2025年上映的电影| 蜜乳av一区二区三区| 欧美一区二区视频在线观看2022| 免费精品视频在线| 久久综合九色综合欧美就去吻 | 亚洲国产色一区|