SOUI 界面之tabctrl控件

1、tabctrl控件的用法
      <!--tab中必须包含有name,pos,tabSkin,iconSkin四个属性,若没有pos属性,不会显示图片到界面上;还有的属性:font表示字体,adding表示字体的大小;tabAlign表示tab的位置,left或者top;tabHeight表示tab的高度;show="1"表示显示,0表示不显示;text-y="50"表示字体的y坐标;colorText表示文本的颜色;icon-x表示icon向右15个坐标单位; focusable表示窗口是否接受焦点,0表示不接受,1表示接受,默认为1接受;tabInterSize表示tab标签的间距;若是top,则tabPos表示tab据左边的间距,若是left,则表示tab据上边的间距;show="1"表示显示,默认为1;curSel表示默认选中的索引-->
      <tabctrl name="tab_main" pos="0,40,-0,-0" tabSkin="_skin.tab.main" iconSkin="_skin.tab.icon" font="face:仿宋_GB2312,adding:-2" tabAlign="left" tabHeight="70" text-y="55" colorText="#0ff0ff"  icon-x="15" focusable="0" tabInterSize="15" tabPos="10" show="1" curSel="0">
        <page title="电脑体验" tip="电脑体验">
        </page>
        <page title="木马查杀" tip="木马查杀">
          <window pos="0,0,-0,-0" skin="_skin.white.bg" >
            <text pos="|0,|5" offset="-0.5,-0.5" font="face:微软雅黑,adding:-3" colorText="#000000">暂时只能做这么多了,没资源了 ;P</text>
          </window>
        </page>
      </tabctrl>

2、控件之中的text控件使用的简单说明

<window pos="0,0,-0,-0" skin="_skin.white.bg">
            <!--pos:第一个参数若为正数,表示向右方偏移,第二个参数若为正数,表示向下方偏移 -->
            <!--offset:一般使用offset="-0.5,-0.5"表示在窗口的中心位置 -->
            <text pos="|0,|5" offset="-0.5,-0.5" font="face:仿宋_GB2312,adding:-3" colorText="#000000">暂时只能做这么多了,没资源了 ;P</text>
          </window>

3、实例如下所示:

窗口布局的文件dlg_main.xml:

  <SOUI name="mainWindow" title="%title%" bigIcon="ICON_LOGO:32" smallIcon="ICON_LOGO:16" width="800" height="640"  margin="20,5,5,5"  resizable="1"
appWnd="1"
translucent="1"
>
  <root skin="_skin.sys.wnd.bkgnd">  <!--使用默认生成的就好-->
    <!--先加载背景,然后再加载 最大最小化。。。。。-->
    <!--pos表示全窗口的大小left,top,right,bottom     -->
    <window pos="0,0,-0,-0" skin="_skin.bg" > 
      <caption pos="0,0,-0,50" show="1" font="adding:0">
       <icon pos="10,8" src="ICON_LOGO:16"/>
        <text pos="29,9" font="#fffff">PKPM 1.0</text>
        <imgbtn name="btn_close" skin="_skin.sys.btn.close"    pos="-45,0" tip="close" animate="1"/>
        <imgbtn name="btn_max" skin="_skin.sys.btn.maximize"  pos="-83,0" animate="1" />
        <imgbtn name="btn_restore" skin="_skin.sys.btn.restore"  pos="-83,0" show="0" animate="1" />
        <imgbtn name="btn_min" skin="_skin.sys.btn.minimize" pos="-121,0" animate="1" />
      </caption>
   
      <!--
      <tabctrl name="tab_main" font="face:微软雅黑,adding:-2" tabPos="10" tabAlign="top" colorText="#ffffff" pos="0,40,-0,-0" show="1" curSel="0" focusable="0" tabHeight="100" tabSkin="_skin.tab.main" iconSkin="_skin.tab.icon" text-y="50" icon-x="12" tabInterSize="5">
        <page title="电脑体验" tip="电脑体验">
        -->
      <!--tab中必须包含有name,pos,tabSkin,iconSkin四个属性,若没有pos属性,不会显示图片到界面上;还有的属性:font表示字体,adding表示字体的大小;tabAlign表示tab的位置,left或者top;tabHeight表示tab的高度;show="1"表示显示,0表示不显示;text-y="50"表示字体的y坐标;colorText表示文本的颜色;icon-x表示icon向右15个坐标单位; focusable表示窗口是否接受焦点,0表示不接受,1表示接受,默认为1接受;tabInterSize表示tab标签的间距;若是top,则tabPos表示tab据左边的间距,若是left,则表示tab据上边的间距;show="1"表示显示,默认为1;curSel表示默认选中的索引-->
      <tabctrl name="tab_main" pos="0,40,-0,-0" tabSkin="_skin.tab.main" iconSkin="_skin.tab.icon" font="face:仿宋_GB2312,adding:-2" tabAlign="left" tabHeight="70" text-y="55" colorText="#0ff0ff"  icon-x="15" focusable="0" tabInterSize="15" tabPos="10" show="1" curSel="0">
        <page title="电脑体验" tip="电脑体验">
          <window pos="0,0,-0,-0" skin="_skin.white.bg">
            <!--pos:第一个参数若为正数,表示向右方偏移,第二个参数若为正数,表示向下方偏移 -->
            <!--offset:一般使用offset="-0.5,-0.5"表示在窗口的中心位置 -->
            <text pos="|0,|5" offset="-0.5,-0.5" font="face:仿宋_GB2312,adding:-3" colorText="#000000">暂时只能做这么多了,没资源了 ;P</text>
          </window>
        </page>
        <page title="木马查杀" tip="木马查杀">
          <window pos="0,0,-0,-0" skin="_skin.white.bg" >
            <text pos="|0,|5" offset="-0.5,-0.5" font="face:微软雅黑,adding:-3" colorText="#000000">暂时只能做这么多了,没资源了 ;P</text>
          </window>
        </page>
        <page title="系统修复" tip="系统修复">
          <window pos="0,0,-0,-0" skin="_skin.white.bg" >
            <text pos="|0,|5" offset="-0.5,-0.5" font="face:微软雅黑,adding:-3" colorText="#000000">暂时只能做这么多了,没资源了 ;P</text>
          </window>
        </page>
        <page title="电脑清理" tip="电脑清理">
          <window pos="0,0,-0,-0" skin="_skin.white.bg" >
            <text pos="|0,|5" offset="-0.5,-0.5" font="face:微软雅黑,adding:-3" colorText="#000000">暂时只能做这么多了,没资源了 ;P</text>
          </window>
        </page>
        <page title="优化加速" tip="优化加速">
          <window pos="0,0,-0,-0" skin="_skin.white.bg" >
            <text pos="|0,|5" offset="-0.5,-0.5" font="face:微软雅黑,adding:-3" colorText="#000000">暂时只能做这么多了,没资源了 ;P</text>
          </window>
        </page>
        <page title="电脑专家" tip="电脑专家">
          <window pos="0,0,-0,-0" skin="_skin.white.bg" >
            <text pos="|0,|5" offset="-0.5,-0.5" font="face:微软雅黑,adding:-3" colorText="#000000">暂时只能做这么多了,没资源了 ;P</text>
          </window>
        </page>
        <page title="电脑门诊" tip="电脑门诊">
          <window pos="0,0,-0,-0" skin="_skin.white.bg" >
            <text pos="|0,|5" offset="-0.5,-0.5" font="face:微软雅黑,adding:-3" colorText="#000000">暂时只能做这么多了,没资源了 ;P</text>
          </window>
        </page>
        <page title="软件管家" tip="软件管家">
          <window pos="0,0,-0,-0" skin="_skin.white.bg" >
            <text pos="|0,|5" offset="-0.5,-0.5" font="face:微软雅黑,adding:-3" colorText="#000000">暂时只能做这么多了,没资源了 ;P</text>
          </window>
        </page>
      </tabctrl>
      <img skin="_skin.logo" pos="-178,40" />
    </window>
  </root>
</SOUI>

相关的资源文件另行配置,运行的效果图如下所示:






  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值