Private Sub fhshow_Click() If MSFG1.WordWrap = True Then MSFG1.WordWrap = False fhshow.Checked = False ShowWj (typeid) Else MSFG1.WordWrap = True fhshow.Checked = True ShowWj (typeid) End If End SubPublic Sub showtitle() Dim i As Integer Dim ss As String ss = "^ |编号|^领导批示|^发文字|^文号|^标题|^发文者|^发文日期|^文件类型" With MSFG1
'.Rows = 1 .Cols = 8 .FormatString = ss .ColWidth(0) = 150 .ColWidth(1) = 0 .ColWidth(2) = 900 .ColWidth(3) = 1300 .ColWidth(4) = 700 .ColWidth(5) = 4000 .ColWidth(6) = 2000 .ColWidth(7) = 1000 .ColWidth(8) = 1500 '.Col = 1 '.Row = 1 End With End Sub 以上是设置的两个过程。都怎么都不行呀。标题不居中,内容不换行
msfhlexgrid.aligment=2
不行呀。
label1.wordwrap=true也不能让标签内容自动换行。
mshflexgrid.formatstring="|^名称"
前面的^ 使名称居中,
如果前面加 < 则是左对齐 > 为右对齐
你可以在字符串中加上 chr(13) 回车
If MSFG1.WordWrap = True Then
MSFG1.WordWrap = False
fhshow.Checked = False
ShowWj (typeid)
Else
MSFG1.WordWrap = True
fhshow.Checked = True
ShowWj (typeid)
End If
End SubPublic Sub showtitle()
Dim i As Integer
Dim ss As String
ss = "^ |编号|^领导批示|^发文字|^文号|^标题|^发文者|^发文日期|^文件类型"
With MSFG1
'.Rows = 1
.Cols = 8
.FormatString = ss
.ColWidth(0) = 150
.ColWidth(1) = 0
.ColWidth(2) = 900
.ColWidth(3) = 1300
.ColWidth(4) = 700
.ColWidth(5) = 4000
.ColWidth(6) = 2000
.ColWidth(7) = 1000
.ColWidth(8) = 1500
'.Col = 1
'.Row = 1
End With
End Sub
以上是设置的两个过程。都怎么都不行呀。标题不居中,内容不换行