|
민인학 님이 쓰신 글 :
: false로 하면 컬럼이 아닌 Row를 선택할수 있는데..
: 대신 컬럼이 선택이 안되더라구요..
: 전 Row선택과 Col을 둘다 선택할수 있어야 하는데요..
: 어떻게 해야하나요?
: 부탁드립니다.
//-------------------------------
안녕하세요
예를 들어 선택된 Col이 남색이고 그 컬럼이 있는 로우가
연한남색 이렇게 하고 싶은신건가요?
아니면 특정 로우를 선택한것처럼 보이게 할라고 하시는지.. --?
아무튼 특정 로우를 선택한것같은 효과를 내려면은 색칠을 해야지요
아래 소스는 한컨 넘어가면서 색칠하는 소스인데 참조하세요
DrawCell이벤트에서
TxSGrid* psDGrid = (TxSGrid*)Sender;
int nCellHeight = Canvas->TextHeight(psDGrid->Cells[ACol][ARow]);
int nYTop = ((Rect.Bottom - Rect.Top)-nCellHeight)/2;
if((ARow%2) == 0){
psDGrid->Canvas->Brush->Color = TColor(0x00F4E9E1);
}
else {
psDGrid->Canvas->Brush->Color = clWhite;
}
psDGrid->Canvas->Brush->Style = bsSolid;
psDGrid->Canvas->FillRect(Rect);
psDGrid->Canvas->Font->Color = clBlack;
psDGrid->Canvas->TextRect(Rect, Rect.Left+4, Rect.Top+nYTop, psDGrid->Cells[ACol][ARow].Trim());
|