我的stringgrid的表头怎么拖动滚动条时也跑到上面去了,我想让他不动,设置了
stringgrid.fixedrow:=1;
还是不行,但是没有显示数据时是可以的,当显示数据后,就有这个问题,
因为stringgrid的列数随程序而变化,所以在响应事件中我作了修改:如下,     AlertStringGrid.ColCount:=11;
       AlertStringGrid.Cells[0,0]:='记录数';
       AlertStringGrid.ColWidths[0]:=40;
       AlertStringGrid.Cells[1,0]:='告警ID';
       AlertStringGrid.colWidths[1]:=80;
       AlertStringGrid.Cells[2,0]:='网元名';
       AlertStringGrid.ColWidths[2]:=80;
       AlertStringGrid.Cells[3,0]:='告警类型';
       AlertStringGrid.ColWidths[3]:=80;
       AlertStringGrid.Cells[4,0]:='告警级别';
       AlertStringGrid.ColWidths[4]:=80;
       AlertStringGrid.Cells[5,0]:='网元对象';
       AlertStringGrid.ColWidths[5]:=80;
       AlertStringGrid.Cells[6,0]:='告警标题';
       AlertStringGrid.ColWidths[6]:=80;
       AlertStringGrid.Cells[7,0]:='告警发生时间';
       AlertStringGrid.ColWidths[7]:=80;
       AlertStringGrid.Cells[8,0]:='告警清除时间';
       AlertStringGrid.ColWidths[8]:=80;
       AlertStringGrid.Cells[9,0]:='告警历时';
       AlertStringGrid.ColWidths[9]:=80;
       AlertStringGrid.Cells[10,0]:='确认标志';
        AlertStringGrid.ColWidths[10]:=80;        AlertStringGrid.FixedRows:=1;
        AlertStringGrid.ParentColor:=false;
        AlertStringGrid.ParentCtl3D:=true;
        AlertStringGrid.ParentFont:=true;
        AlertStringGrid.ParentShowHint:=true;
        AlertStringGrid.Parent:=ActiveForm;
        AlertStringGrid.ScrollBars:=ssboth;
        AlertStringGrid.Enabled:=true;
        AlertStringGrid.Visible:=true;