zoukankan      html  css  js  c++  java
  • 改变TPageControl的活动标签颜色

    设置PageControl的owndraw属性为TRUE.

    procedure TForm1.pgc1DrawTab(Control: TCustomTabControl; TabIndex: Integer;
      const Rect: TRect; Active: Boolean);
      var
          cc:   Cardinal;
          tabRect:   TRect;
      begin
          CopyRect(tabRect,Rect);
          Control.Canvas.Brush.Color:=   Self.color;
          SetBkMode(Control.Canvas.Handle,1);
          Control.Canvas.FillRect(tabRect);
          cc     :=   SetTextAlign(Control.Canvas.Handle,TA_TOP);
          if(not   Active)   then
          begin
              SetTextColor(Control.Canvas.Handle,RGB(0,0,0));
              Control.Canvas.TextOut(tabRect.Left+5,Rect.Top+2,TPageControl(Control).Pages[TabIndex].Caption);
          end
          else
          begin
              SetTextColor(Control.Canvas.Handle,ColorToRGB(clBlue));
              Control.Canvas.TextOut(tabRect.Left+5,Rect.Top+4,TPageControl(Control).Pages[TabIndex].Caption);
          end;
          SetBkMode(Control.Canvas.Handle,0);
          SetTextAlign(Control.Canvas.Handle,cc);
      end;

    http://blog.csdn.net/diligentcatrich/article/details/5573423

  • 相关阅读:
    ruby html解析器
    国外cdn
    ruby爬虫utf8编码相关
    Ruby 1.9 regex (named capture group)正则名组
    ruby爬虫综述
    ruby新加实例方法写法
    机房
    Net::HTTP Cheat Sheet
    ror一键安装包forwin
    病毒6655.la
  • 原文地址:https://www.cnblogs.com/findumars/p/5218067.html
Copyright © 2011-2022 走看看