Q&A

  • TabSet의 Tab에 Color 넣기...


안녕하세요.. 언제나 좋은 정보만을 얻어가는 초보입니다.

다름이 아니라 TabSet을 만들던중 궁금한 사항이 있어서염. ~~
그림과 같이 만들고자 아래와 같이 코딩을 하였습니다.
근데 이상하게 안되네염.. 도와 주세요. ~~


procedure TForm1.TabSet1DrawTab(Sender: TObject; TabCanvas: TCanvas;
  R: TRect; Index: Integer; Selected: Boolean);
Var
  points : Array of [0..3] TPoint;
begin

TabCanvas.FillRect(R);
  if not  Selected then begin
    
     points[0] = Point(R.Left, R.bottom);
     points[1] = Point(R.Right,R.bottom-5);
     points[2] = Point(R.Right+5,R.Top-5);
     points[3] = Point(R.Left-5,R.Top);

     TabCanvas->Brush->Color = clTeal;
     TabCanvas->Polygon(points, 3);


end;
1  COMMENTS