当前位置: 代码迷 >> PB >> 菜单的属性,该怎么解决
  详细解决方案

菜单的属性,该怎么解决

热度:31   发布时间:2016-04-29 06:25:46.0
菜单的属性
主菜单有一子项 clicked()代码如下:
if this.checked then
close(w_record_lan)
this.checked=false
else 
open(w_record_lan)
this.checked=true 
end if

我需要在w_main在开始时,根据配置文件ini而判断子项是否打勾,问如何做?
------解决方案--------------------
在窗口里引用菜单可以用

this.menuid


long ll_i
for ll_i = 1 to upperbound(this.menuid.item)
   this.menuid.item[ll_i].checked = true
next

------解决方案--------------------
子项有id的,直接通过子项的id访问设置其checked属性
比如m_main.m_sub.checked=profilestring('a.ini','sys','record_lan','1')='1'
  相关解决方案