掲示板システム
ホーム
アクセス解析
カテゴリ
ログアウト
TStringGridでセルを結合するには? (ID:14407)
名前
ホームページ(ブログ、Twitterなど)のURL (省略可)
本文
範囲選択できないけど・・・ with TStringGrid(Sender) do begin if ((ACol < 6) and (gdFixed in State) and (ARow < 2)) then begin case ARow of 0 : Rect.Bottom := Rect.Bottom + RowHeights[1]; 1 : Rect.Top := Rect.Top - (RowHeights[0] + 1); end; Canvas.Brush.Color := clBtnFace; Canvas.Font.Color := clBlack; Canvas.FillRect(Rect); DrawEdge(Canvas.Handle, Rect, BDR_RAISEDINNER, BF_RECT); DrawText(Canvas.Handle, PChar(Cells[ACol, ARow]), -1, Rect, DT_SINGLELINE or DT_CENTER or DT_VCENTER); end else begin Canvas.Font.Color := clBlack; if gdFixed in State then begin Canvas.Brush.Color := clBtnFace; Canvas.FillRect(Rect); DrawEdge(Canvas.Handle, Rect, BDR_RAISEDINNER, BF_RECT); end else begin Canvas.Brush.Color := clWindow; Canvas.FillRect(Rect); end; DrawText(Canvas.Handle, PChar(Cells[ACol, ARow]), -1, Rect, DT_SINGLELINE or DT_CENTER or DT_VCENTER); end; end;
←解決時は質問者本人がここをチェックしてください。
戻る
掲示板システム
Copyright 2021 Takeshi Okamoto All Rights Reserved.