|
민인학 님이 쓰신 글 :
: 오브젝트 인스펙터에 봐도 시그널이 없습니다.
: 아니면. 제가 못찿는것일지도요..
: 부탁드립니다. ^^
:
//---------------------------------------------
안녕하세요
저도 찾지를 못하겠습니다.
그래서 코딩으로 해봤는데요.. 요것도 꽁수네요
코딩이 도움됬으면 좋겠네요
void __fastcall TForm1::FormShow(TObject *Sender)
{
TRect rect;
for(int i=0 ; i<StringGrid1->ColCount ; i++) {
rect = StringGrid1->CellRect(i, 0);
x_nColSize[i] = rect.Right - rect.Left;
}
}
//---------------------------------------------------------------------------
void __fastcall TForm1::StringGrid1MouseUp(TObject *Sender,
TMouseButton Button, TShiftState Shift, int X, int Y)
{
int nRet = fnGetResizeCol();
if(nRet >= 0) {
//-- 여기다 코딩
Memo1->Lines->Add(nRet);
}
else
return;
}
//---------------------------------------------------------------------------
int __fastcall TForm1::fnGetResizeCol()
{
TRect rect;
int nColWidth;
int nResult = -1;
for(int i=0 ; i<StringGrid1->ColCount ; i++) {
rect = StringGrid1->CellRect(i, 0);
nColWidth = rect.Right - rect.Left;
if(x_nColSize[i] != nColWidth)
nResult = i;
x_nColSize[i] = nColWidth;
}
|