以文本方式查看主题 - Foxtable(狐表) (http://foxtable.net/bbs/index.asp) -- 专家坐堂 (http://foxtable.net/bbs/list.asp?boardid=2) ---- 表格控件的大小 (http://foxtable.net/bbs/dispbbs.asp?boardid=2&id=190186) |
-- 作者:lur320 -- 发布时间:2024/1/23 11:21:00 -- 表格控件的大小 CreateSQLQuery动态创建的表格,如何设置SetBounds,使得表格的每一列能自动大小?如何得到autosizecols之后的大小? |
-- 作者:lur320 -- 发布时间:2024/1/23 11:28:00 -- Dim tbl As WinForm.Table Dim comm As String comm = "selexxxxx from {RecordValue}" tbl = e.Form.CreateSQLQuery("Table1", comm, "productuiondata") tbl.BindTable.AutoSizeCols Dim i As Integer For Each cc As Col In tbl.BindTable.Cols i += cc.Width Next tbl.SetBounds(0, e.Form.Controls("TextBox1").Height, 1000, i) e.Form.AddControl(tbl) 这样子不行,会报错
|
-- 作者:有点蓝 -- 发布时间:2024/1/23 11:50:00 -- Dim tbl As WinForm.Table Dim comm As String comm = "select * from {RecordValue}" tbl = e.Form.CreateSQLQuery("Table1", comm, "productuiondata") e.Form.AddControl(tbl) tbl.Table.AutoSizeCols Dim i As Integer For Each cc As Col In tbl.Table.Cols i += cc.PrintWidth *96/25.4 Next tbl.SetBounds(0, e.Form.Controls("TextBox1").Height+5, i + 35, 1000)
|