procedure TForm1.Stringgrid1DrawCell(Sender: TObject; ACol, ARow: Integer; Rect: TRect; State: TGridDrawState); begin with Sender as TStringGrid do begin Canvas.FillRect(Rect); DrawText(Canvas.Handle, Pchar(Cells[ACol, ARow]), Length(Cells[ACol, ARow
void java.awt.Container.validate()Validates this container and all of its subcomponents.这个函数更新容器及其全部子控件,更新容器意味着重新布置它的子控件.布局相关的更改(例如设置子控件的大小位置,向容器添加新控件)会invalidate这个容器.需要注意,当前容器invalidate会自动导致它的父容器进行invalidate(详见Component.invalidate).因此,要想恢复整个层次的有效性(v