以文本方式查看主题

-  Foxtable(狐表)  (http://foxtable.com/bbs/index.asp)
--  专家坐堂  (http://foxtable.com/bbs/list.asp?boardid=2)
----  [求助]下拉窗口的宽度,如何调整?  (http://foxtable.com/bbs/dispbbs.asp?boardid=2&id=172178)

--  作者:wangjh8888
--  发布时间:2021/9/28 10:55:00
--  [求助]下拉窗口的宽度,如何调整?
老师 好
想调整下拉窗口,红色代码,没有效果,请教!

DropDownOpened事件:

Dim txt1 As String = Forms("接收").controls("ComboBox-数据来源").Text
Dim txt2 As String = Forms("接收").controls("ComboBox-来源名称").Text
Dim txt3 As String = e.Form.DropDownBox.Text

Dim t As Table = Forms("当前节点下拉窗口").controls("Table1").Table   
t.Filter = "[Class] = \'数据\' and [Scene] =\'"  & txt1 & "\'  And [Cont1] = \'" & txt2 & "\'"

Select Case txt1
    Case "A"
        Forms("当前节点下拉窗口").Width = 100
        t.SetColVisibleWidth("Cont3|100")

    Case "B"
        Forms("当前节点下拉窗口").Width = 180
        t.SetColVisibleWidth("Cont2|120|Cont3|60")

End Select

--  作者:有点蓝
--  发布时间:2021/9/28 11:02:00
--  
Forms("当前节点下拉窗口").Width = 100
改为
e.Form.panel.parent.width = 100

--  作者:wangjh8888
--  发布时间:2021/9/28 11:06:00
--  
ok 谢谢