wincc 内哪些控件可以用来显示SQL的数据表格
展开全部
很多控件都可以,如果自己写脚本,像text,Listbox,MSFlexGrid,combobox都可以,主要看你数据显示格式了,最好就用MSFlexGrid1控件了,给你一个控件使用的例子:
Dim str1
pt = App.Path
t = pt & "\MS.txt"
Open t For Input As #1 ''打开文件
If (LOF(1) > 0) Then
Do While Not EOF(1)
Line Input #1, str1 ''存放
Loop
End If
Close #1 ''关闭文件
Dim str2 As String
str2 = "字段一|字段二|字段三|字段四"
MSFlexGrid1.AllowUserResizing = 1
MSFlexGrid1.FixedRows = 1
MSFlexGrid1.FixedCols = 0
MSFlexGrid1.FormatString = str2
MSFlexGrid1.ColWidth(0) = 1600
MSFlexGrid1.ColWidth(1) = 2300
MSFlexGrid1.ColWidth(2) = 2300
MSFlexGrid1.ColWidth(3) = 1600
MSFlexGrid1.Rows = 1
MSFlexGrid1.Cols = 4
s = Split(str1, " ")
MSFlexGrid1.AddItem (s(0) & vbTab & s(1) & vbTab & s(2) & vbTab & s(3))
Dim str1
pt = App.Path
t = pt & "\MS.txt"
Open t For Input As #1 ''打开文件
If (LOF(1) > 0) Then
Do While Not EOF(1)
Line Input #1, str1 ''存放
Loop
End If
Close #1 ''关闭文件
Dim str2 As String
str2 = "字段一|字段二|字段三|字段四"
MSFlexGrid1.AllowUserResizing = 1
MSFlexGrid1.FixedRows = 1
MSFlexGrid1.FixedCols = 0
MSFlexGrid1.FormatString = str2
MSFlexGrid1.ColWidth(0) = 1600
MSFlexGrid1.ColWidth(1) = 2300
MSFlexGrid1.ColWidth(2) = 2300
MSFlexGrid1.ColWidth(3) = 1600
MSFlexGrid1.Rows = 1
MSFlexGrid1.Cols = 4
s = Split(str1, " ")
MSFlexGrid1.AddItem (s(0) & vbTab & s(1) & vbTab & s(2) & vbTab & s(3))
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询