在StringGrid的DrawCell事件中添加类似的代码就可以了: VAR vCol, vRow : LongInt; begin vCol := ACol; vRow := ARow; WITH Sender AS TStringGrid, Canvas DO IF vCol = 2 THEN BEGIN ///对于第2列设置为右对齐 SetTextAlign(Handle, TA_RIGHT); FillRect(Rect); TextRect(Rect, Rect.RIGHT-2, Rect.Top+2, Cells[vCol, vRow]); END; end;此文章由 http://www.ositren.com 收集整理 ,地址为: http://www.ositren.com/htmls/68032.html