Delphi Programming Forum
C++Builder  |  Delphi  |  FireMonkey  |  C/C++  |  Free Pascal  |  Firebird
볼랜드포럼 BorlandForum
 경고! 게시물 작성자의 사전 허락없는 메일주소 추출행위 절대 금지
델파이 포럼
Q & A
FAQ
팁&트릭
강좌/문서
자료실
컴포넌트/라이브러리
FreePascal/Lazarus
볼랜드포럼 홈
헤드라인 뉴스
IT 뉴스
공지사항
자유게시판
해피 브레이크
공동 프로젝트
구인/구직
회원 장터
건의사항
운영진 게시판
회원 메뉴
북마크
델마당
볼랜드포럼 광고 모집

델파이 Q&A
Delphi Programming Q&A
[16148] Re:TcxDBTreeList 데이터 표출 row색상 변경방법 문의
수원성 [] 595 읽음    2020-12-28 10:18
starter 님이 쓰신 글 :
: delphi 프로그램 개발중인 초보개발자입니다.
: TcxDBTreeList의 데이터 표기될때... 짝수줄, 홀수줄의 row색상을 변경하고.... 포커스되는 data row의 색상을 변경하는 방법을 알고싶어서 글을 남깁니다...
: 제가  cxDBTreeListCustomDrawDataCell 이벤트에서 사용중인데..
:
:   if AViewInfo.TreeList.Focused then
:   begin
:     ACanvas.Brush.Color := ~~;
:     ACanvas.Font.Color  := ~~;
:   end
:   else
:   if odd(AViewInfo.RecordIndex) then
:   begin
:     ACanvas.Brush.Color := ~~;
:     ACanvas.Font.Color  := ~~;
:   end
:   else
:   begin
:     ACanvas.Brush.Color := ~~;
:     ACanvas.Font.Color  := ~~;
:   end;
:
: 아래와 같은 방식으로..코딩중인데..
: 저건 정상적인게 아닌것 같고... 다른방법이 있을까요..ㅠ


Styles Property에 ContentEven, ContentOdd 에 색상 Style을 추가하면 색상변경 가능함.
Forcus는 기존 방식(cxDBTreeListCustomDrawDataCell )을 사용.

procedure TForm1.cxDBTreeList1CustomDrawDataCell(Sender: TcxCustomTreeList; ACanvas: TcxCanvas;
  AViewInfo: TcxTreeListEditCellViewInfo; var ADone: Boolean);
begin
  if AViewInfo.Focused then
    ACanvas.Brush.Color := clLime

+ -

관련 글 리스트
16147 TcxDBTreeList 데이터 표출 row색상 변경방법 문의 starter 600 2020/12/24
16148     Re:TcxDBTreeList 데이터 표출 row색상 변경방법 문의 수원성 595 2020/12/28
Google
Copyright © 1999-2015, borlandforum.com. All right reserved.