金山开源(bkwin) 定义界面时按钮没反应的问题

来源:互联网 发布:香港有淘宝网吗 编辑:程序博客网 时间:2024/04/26 18:49

用bkwin 做一些测试,发现在 body里定义的一个按钮始终没有反应,定义的Xml如下

<?xml version="1.0" encoding="utf-8"?><layer title="AAAAAAAAA" width="1024" height="768" appwin="1" resize="1">    <header class="dlg_header" width="full" height="30">        <img pos="8,8" skin="pic_little_logo"/>        <text pos="28,10" class="pic_head_text_title">            AAAAAAAAAAAA        </text>        <imgbtn id="102" pos="-105,1" tip="最小化" skin="dlg_btn_min"/>        <imgbtn id="101" pos="-74,1" tip="最大化" skin="dlg_btn_max"/>        <imgbtn id="100" pos="-43,1" tip="关闭" skin="dlg_btn_close"/>    </header>    <body class="bg_mainbody" width="full" height="full">        <img pos="-206,5" skin="pic_head_blank"/><imgbtn id="110" pos="|-69,5,|69" tip="菜单" skin="dlg_btn_menu"/>        <tabctrl id="136" tabwidth="71" tabheight="71" tabskin="tab_main" crtext="FFFFCC" tabspacing="5" tabpos="1" framepos="7" pos="4,4,-0,-1" icon-x="10" icon-y="1" text-x="0" text-y="25">                 <tab title="1111111111" width="full" height="full" crtext="000000">                <dlg pos="0,2,-0,-0">                    <realwnd id="301" ctrlid="301" pos="0,10,-5,-5"/>                </dlg>            </tab>            <tab title="2222222222" width="full" height="full" crtext="FFFFFF">                <dlg pos="0,2,-0,-0">                    <realwnd id="401" ctrlid="401" pos="0,10,-5,-5"/>                </dlg>            </tab>            <tab title="3333333333" width="full" height="full" crtext="FFFFFF">                         </tab>        </tabctrl>    </body><footer class="dlg_footer" width="full"  height="50" >         </footer></layer>

其中  <imgbtn id="110" pos="|-69,5,|69" tip="菜单" skin="dlg_btn_menu"/> 是定义的按钮,没有任何反应

如果上述按钮定义放到<footer class="dlg_footer" width="full"  height="50" >   </footer> 中却是是生效的

其实我想实现的是这样的设置

 <tab title="333333333" width="full" height="full" crtext="FFFFFF"><dlg pos="0,10,-5,-5" class="bg_bar">                                       <imgbtn id="110" pos="|-69,5,|69" tip="菜单" skin="dlg_btn_menu"/>   </dlg>                <dlg pos="0,2,-0,-0">    <realwnd id="501" ctrlid="501" pos="0,50,-5,-5"/>                </dlg>            </tab>

即 定义一个toolbar 包含所有的按钮,但是按钮始终没有生效,用了好几天的时间测试各种可能

最后一不小心把定义的位置,换了换,即把对按钮的定义(id="110")放到列表dlg(id="501")下面,竟然可以了,真神奇啊 

 <dlg pos="0,2,-0,-0">    <realwnd id="501" ctrlid="501" pos="0,50,-5,-5"/>                </dlg><dlg pos="0,10,-5,-5" class="bg_bar">                                       <imgbtn id="110" pos="|-69,5,|69" tip="菜单" skin="dlg_btn_menu"/>   </dlg>


效果图



原创粉丝点击