くだすれDelphi(超初心者用)その25
■ このスレッドは過去ログ倉庫に格納されています
0746デフォルトの名無しさん
2005/07/02(土) 11:09:33begin
...
StringGrid1.Objects[Col,Row] := BtnName;
end;
の最後に追加
StringGrid1DrawCellイベントを作成して下記をペースト
procedure TForm1.StringGrid1DrawCell(Sender: TObject; ACol, ARow: Integer;
Rect: TRect; State: TGridDrawState);
var
AStringGrid : TStringGrid;
begin
if (Sender is TStringGrid) then
AStringGrid := TStringGrid(Sender)
else
AStringGrid := StringGrid1;
if ARow < AStringGrid.FixedRows then
if Assigned(AStringGrid.Objects[ACol, ARow])
and (AStringGrid.Objects[ACol, ARow] is TWinControl) then
begin
TWinControl(AStringGrid.Objects[ACol, ARow])
.SetBounds(Rect.Left,Rect.Top,Rect.Right-Rect.Left,Rect.Bottom-Rect.Top);
end;
end;
■ このスレッドは過去ログ倉庫に格納されています