'窗体通用部分代码(窗体所有代码的最上部)
Private x As Integer
'添加文本按钮代码
Private Sub command1_Click()
If Text1 = "" Then Exit Sub
x = x + 1
MSFlexGrid1.Rows = x + 1
MSFlexGrid1.TextMatrix(x, 0) = x
MSFlexGrid1.TextMatrix(x, 1) = Text1
End Sub
'窗体初始化代码
Private Sub Form_Load()
MSFlexGrid1.Clear
MSFlexGrid1.Cols = 2
'设置表头栏
For i = 0 To 1
MSFlexGrid1.Row = 0
MSFlexGrid1.Col = i
MSFlexGrid1.RowHeight(0) = 400
Select Case i
Case 0
MSFlexGrid1.FixedAlignment(0) = 4
MSFlexGrid1.ColWidth(0) = 800
MSFlexGrid1.Text = "序号"
Case 1
MSFlexGrid1.FixedAlignment(1) = 4
MSFlexGrid1.ColWidth(1) = 2500
MSFlexGrid1.Text = "输入字段"
End Select
Next i
End Sub
[此贴子已经被作者于2006-3-17 23:28:17编辑过]