(1)切换成DDDW:
dw_1.Modify("#1.dddw.Name='dddw_jg'")
dw_1.Modify("#1.dddw.DisplayColumn='name_jg'")
dw_1.Modify("#1.dddw.DataColumn='id_jg'")
(2)切换成DDLB:
dw_1.Modify("#1.ddlb.case='any'")
dw_1.Object.#1.Values ="red~t1/white~t2"
(3)切换成EDIT:
dw_1.Modify("#1.edit.case='any'")
dw_1.Modify("#1.edit.AutoSelect='Yes'")
(4)获取当前风格:
dw_1.Describe("#1.Edit.Style")
(5)如果还不行,可能得要如下操作:
dw_1.Modify("#1.dddw.Name=''")一下;
-----------------------------------------------------------------------------------------------
方法:动态建立变换dddw和edit风格
//d_province为下拉数据窗囗对象
If is_flag = 'A ' Then //变为dddw
dw_1.Modify( "province.dddw.Name = 'd_province ' ")
dw_1.Modify( "province.dddw.DataColumn = 'id ' ")
dw_1.Modify( "province.dddw.DisplayColumn = 'province ' ")
dw_1.Modify( "province.dddw.AllowEdit = 'True ' ")
dw_1.Modify( "province.dddw.AutoRetrieve = 'True ' ")
is_flag = 'B '
Else //变回edit
dw_1.Modify( "province.dddw.Name = ' ' ")
dw_1.Modify( "province.dddw.DataColumn = ' ' ")
dw_1.Modify( "province.dddw.DisplayColumn = ' ' ")
dw_1.Modify( "province.dddw.AllowEdit = ' ' ")
dw_1.Modify( "province.dddw.AutoRetrieve = ' ' ")
is_flag = 'A '
End If