|
아무리 찾아봐도가 아니라.. 헬프를 제대로 안 찾아보셨네요.
Selection이라는 프라퍼티가 있죠.
Selection은 TGridRect입니다. 아래 제가 헬프파일을 첨부합니다.
내용을 보시면 쉽게 이해되실겁니다. 스트링그리드는 여러 셀을 동시에 선택할 수 있기 때문에 선택한 영역의 Left, Top, Right, Bottom값으로 얻어집니다.
struct TGridCoord
{
int X;
int Y;
};
struct TGridRect
{
union
{
struct
{
TGridCoord TopLeft;
TGridCoord BottomRight;
};
struct
{
int Left;
int Top;
int Right;
int Bottom;
};
};
};
__property TGridRect Selection = {read=GetSelection, write=SetSelection};
Description
Set Selection to select a range of cells in the grid. Selection can either represent the first column, first row, last column and last row in the grid, or the row and column coordinates of the upper left and bottom right cells in the selected region.
Selection can only indicate more than one cell when Options includes goRangeSelect.
newhuni 님이 쓰신 글 :
:
:
: 안녕하세요 ^^a;;
: 한가지 여쭤볼것이 있어서여...
:
: StringGrid를 사용하고 있습니다.
:
: StringGrid에서 선택된 셀들만 구분지을수 있을까요??
: 사용자가 선택한 셀들의 내용을 모두 지울려고 하는데
: 선택된 셀을 어떻게 찾아야 할지 모르겠네요 ^^a;;
:
: 고수님들 아시면 알려주세요 ^^
: 아무리 찾아봐도 모르겠네요...
:
:
|