以文本方式查看主题

-  Foxtable(狐表)  (http://foxtable.net/bbs/index.asp)
--  专家坐堂  (http://foxtable.net/bbs/list.asp?boardid=2)
----  [求助]如何设置记录窗口字体,行高,列宽  (http://foxtable.net/bbs/dispbbs.asp?boardid=2&id=130601)

--  作者:智友软件工作室
--  发布时间:2019/1/26 12:14:00
--  [求助]如何设置记录窗口字体,行高,列宽
For Each a As OBJECT In Tables("工作记录").grid.parent.controls
    For Each b As OBJECT In a.controls
        If b.text = "工作记录" Then
            Dim bctr = b.controls(0).controls(0)
            bctr.Font = new font("微软雅黑",12)
            bctr.AutoSizeRows
            \'bctr.AutoSizeCols
            \'bctr.SetColVisibleWidth(cvs)
            Output.Show(bctr.GetColVisibleWidth)
            Exit For
        End If
    Next
Next

按照论坛给的例子是自动列宽和行高,但在实际应用过程中,需要自定义设置行高和列宽,请问如何设置呢?

--  作者:有点蓝
--  发布时间:2019/1/26 12:43:00
--  
For Each a As OBJECT In Tables("工作记录").grid.parent.controls
    For Each b As OBJECT In a.controls
        If b.text = "工作记录" Then
            Dim bctr = b.controls(0).controls(0)
            bctr.Font = new font("微软雅黑",12)
            bctr.Cols(0).width = 100 \'列宽
            bctr.Rows(2).height = 50 \'行高
            Exit For
        End If
    Next
Next