乡下人产国偷v产偷v自拍,国产午夜片在线观看,婷婷成人亚洲综合国产麻豆,久久综合给合久久狠狠狠9

  • <output id="e9wm2"></output>
    <s id="e9wm2"><nobr id="e9wm2"><ins id="e9wm2"></ins></nobr></s>

    • 分享

      Delphi - 在ListView中添加一個(gè)進(jìn)度條 - 51100k的日志 - 網(wǎng)易博客

       遠(yuǎn)在南非 2010-07-10

      Delphi - 在ListView中添加一個(gè)進(jìn)度條

      Delphi 2009-12-15 15:22:35 閱讀206 評(píng)論0 字號(hào):

      Function GetSubItemRect( handle, ItemsIndex, SubIndex: Integer ): TRect ;
      Begin
      ListView_GetSubItemRect( Handle, ItemsIndex, SubIndex, 0, @Result ) ;
      End ;
      Procedure TFormMain.lvw_listCustomDrawSubItem( Sender: TCustomListView ;
      Item: TListItem ;SubItem: Integer ;State: TCustomDrawState ;
      Var DefaultDraw: Boolean ) ;
      Var
      l_Rect: TRect ;
      l_intPercent: Integer ;
      Begin
      If SubItem = 3 Then
      Begin
      If Item.Data = Nil Then
      Exit ;
      l_intPercent := PListData( Item.Data ).Percent ;
      //獲取ListView子項(xiàng)的Rect
      l_Rect := GetSubItemRect( Item.Handle, Item.Index, SubItem ) ;
      //畫一條外邊框
      InflateRect( l_Rect, -1, -1 ) ;
      Sender.Canvas.Brush.Color := clBlack ;
      Sender.Canvas.FrameRect( l_Rect ) ;
      //先填充底色
      InflateRect( l_Rect, -1, -1 ) ;
      Sender.Canvas.Brush.Color := lvw_list.Color ;
      Sender.Canvas.FillRect( l_Rect ) ;
      //再根據(jù)進(jìn)度畫出完成區(qū)域
      If l_intPercent = 100 Then
      Sender.Canvas.Brush.Color := clGreen
      Else
      Sender.Canvas.Brush.Color := clPurple ;
      l_Rect.Right := l_Rect.Left + Floor( ( l_Rect.Right - l_Rect.Left ) * l_intPercent / 100 ) ;
      Sender.Canvas.FillRect( l_Rect ) ;
      //恢復(fù)筆刷
      Sender.Canvas.Brush.Color := lvw_list.Color ;
      //關(guān)鍵的一句,屏蔽系統(tǒng)自繪過程
      DefaultDraw := False ;
      End ;
      End ;
      相關(guān)定義
      Type
      TListData = Record
      FileName: String ;
      Percent: Integer ;
      End ;
      PListData = ^TListData ;
        本文來自CSDN博客,轉(zhuǎn)載請(qǐng)標(biāo)明出處:http: //blog.csdn.net/kwbin/archive/2008/11/26/3381317.aspx
      效果圖:
      2008-11-26_173648
       

        本站是提供個(gè)人知識(shí)管理的網(wǎng)絡(luò)存儲(chǔ)空間,所有內(nèi)容均由用戶發(fā)布,不代表本站觀點(diǎn)。請(qǐng)注意甄別內(nèi)容中的聯(lián)系方式、誘導(dǎo)購買等信息,謹(jǐn)防詐騙。如發(fā)現(xiàn)有害或侵權(quán)內(nèi)容,請(qǐng)點(diǎn)擊一鍵舉報(bào)。
        轉(zhuǎn)藏 分享 獻(xiàn)花(0

        0條評(píng)論

        發(fā)表

        請(qǐng)遵守用戶 評(píng)論公約

        類似文章 更多