자유롭게 질의 및 응답을 할 수 있는 게시판입니다. 개발자 여러분의 답변이 큰 도움이 됩니다. 
  • 제품설치/등록 오류 문의: 설치/등록 Q&A 이용 (제품 구매 고객 한정)

procedure TForm1.StringGrid1DrawColumnCell(Sender: TObject;
  const Canvas: TCanvas; const Column: TColumn; const Bounds: TRectF;
  const Row: Integer; const Value: TValue; const State: TGridDrawStates);
const
  HorzTextMargin = 2;
  VertTextMargin = 1;
var
  TextLayout : TTextLayout;
  TextRect: TRectF;
begin
  if Column = StringColumn1 then
  begin
    TextRect := Bounds;
    TextRect.Inflate(-HorzTextMargin, -VertTextMargin);
    Canvas.FillRect(Bounds, 0, 0, AllCorners, 1);
    TextLayout := TTextLayoutManager.DefaultTextLayout.Create;
    try
      TextLayout.BeginUpdate;
      try
        TextLayout.WordWrap := False;
        TextLayout.Opacity := Column.AbsoluteOpacity;
        TextLayout.HorizontalAlign := StringGrid1.TextSettings.HorzAlign.tacenter;
        TextLayout.VerticalAlign := StringGrid1.TextSettings.VertAlign;
        TextLayout.Trimming := TTextTrimming.Character;
        TextLayout.TopLeft := TextRect.TopLeft;
        TextLayout.Text    := Value.ToString;
        TextLayout.MaxSize := PointF(TextRect.Width, TextRect.Height);
//        TextLayout.Font.Family := 'Times New Roman';
//        TextLayout.Font.Style := [ TFontStyle.fsBold ];
//        TextLayout.Font.Size := 14;
        TextLayout.Color := TAlphaColors.Red;
      finally
        TextLayout.EndUpdate;
      end;
      TextLayout.RenderLayout(Canvas);
    finally
      TextLayout.Free;
    end;
  end;
end;


해당컬럼의 색을 변하지 않게 하는 방법이 없나요 ??


번호 제목 글쓴이 날짜 조회 수
공지 [프로그래밍 강의] 2021.6~2021.12 관리자 2015.01.22 17298
공지 유용한 관련 사이트 관리자2 2014.03.20 56182
공지 본 게시판은 개발자 여러분들의 질문과 답변을 공유하는 공간입니다. 관리자 2012.01.10 99606
634 델파이XE3에서 FireMonkey TWebBrowser컴포넌트 관련해서 문의드립니다. [2] secret 최은우 2012.11.21 4
633 XE3 TMemo 버그 secret Feelple(고재철) 2013.01.01 4
632 [xe7] 간단한 질문 몇가지 입니다. [1] secret hims 2014.11.18 4
631 (재문의-급) XE8 Android에서 ini 파일 관련 문의 드립니다. [3] secret 비도리 2015.12.23 10
630 설치및 구버젼 라인센스 [2] 희망나라 2020.07.02 90
629 시애틀 TBeacon컴포넌트가 같은 기종의 모바일에서 작동 유무가 다릅니다. 김태윤 2016.10.19 107
628 스프레쉬가 안 나타납니다. [1] file 거북이 2015.11.11 109
627 베를린 update2 후 SqlConnect 컴포넌트가 없어요(DBexpress) 모나도 2017.01.14 112
626 주소록 가져오는 셈플 테스트가 안됩니다. [1] 쿠리 2017.06.09 113
625 Shape 컨트롤 의 Stroke문제 100jk 2019.03.18 113
624 TBeacon 비동기I/O관련 질문입니다. [1] 김태윤 2016.07.19 114
623 모바일 터치 이벤트 관련 문의 박수영 2018.11.13 115
622 XE10 Seattle에서 VIEW 범위 질문 [1] 당신이먼저 2017.03.04 116
621 멀티디바이스 기본 MasterDetail 템플릿에서 데이터들은 어디서 가져오나요? [2] Vincent 2017.09.22 116
620 linux console에서 webbrowser에러 100jk 2021.02.23 117
619 Firemoney 로 Mac 및 리눅스 앱 제작시 [1] 100jk 2020.06.26 122
618 베를린의 다이나믹 리스트뷰에서 정렬하는 방법을 알고 싶습니다. [1] file 거북이 2016.05.09 123
617 xe 10.2 에서 Form transparency 기능 문의 vastia 2017.07.20 124
616 디버깅 방법 문의드립니다. 엘타 2016.08.27 127
615 datasnap 레코드수정방법 문의드립니다 천년바우 2016.10.17 127