duilib(Troy)------输入框实例

24 篇文章 7 订阅

输入框:

xml配置:

<?xml version="1.0" encoding="utf-8"?>
<Window size="550,350" sizebox="4,4,6,6" roundcorner="0,0" caption="0,0,0,64" bktrans="false" mininfo="550,350" showshadow="true" shadowimage="main/shadow.png" shadowsize="6" shadowcorner="8,8,8,8">
  <Font shared="true" id="0" name="宋体" size="13" default="true"/>
  <Font shared="true" id="1" name="宋体" size="12" bold="false" underline="true"/>
  <Font shared="true" id="2" name="宋体" size="16" bold="false"/>
  <Font shared="true" id="3" name="宋体" size="18" bold="false"/>
  <Default name="VScrollBar" shared="true" value="width=&quot;8&quot; showbutton1=&quot;false&quot; showbutton2=&quot;false&quot; thumbnormalimage=&quot;file='common/vscrollbar.png' source='0,60,8,100' corner='0,4,0,4'&quot; thumbhotimage=&quot;file='common/vscrollbar.png' source='8,60,16,100' corner='0,4,0,4'&quot; thumbpushedimage=&quot;file='common/vscrollbar.png' source='16,60,24,100' corner='0,4,0,4'&quot; railnormalimage=&quot;&quot; railhotimage=&quot;&quot; railpushedimage=&quot;&quot; raildisabledimage=&quot;&quot; bknormalimage=&quot;file='common/vscrollbar.png' source='0,0,8,60' corner='0,4,0,4'&quot; bkhotimage=&quot;&quot; bkpushedimage=&quot;&quot; bkdisabledimage=&quot;&quot; "/>
  <Default name="HScrollBar" shared="true" value="height=&quot;8&quot; showbutton1=&quot;false&quot; showbutton2=&quot;false&quot; thumbnormalimage=&quot;file='common/hscrollbar.png' source='0,0,32,8' corner='4,0,4,0'&quot; thumbhotimage=&quot;file='common/hscrollbar.png' source='0,8,32,16' corner='4,0,4,0'&quot; thumbpushedimage=&quot;file='common/hscrollbar.png' source='0,16,32,24' corner='4,0,4,0'&quot; railnormalimage=&quot;&quot; railhotimage=&quot;&quot; railpushedimage=&quot;&quot; raildisabledimage=&quot;&quot; bknormalimage=&quot;file='common/hscrollbar.png' source='0,0,32,8' corner='4,0,4,0'&quot; bkhotimage=&quot;&quot; bkpushedimage=&quot;&quot; bkdisabledimage=&quot;&quot; "/>
  <Style name="edit_style" value="width=&quot;100&quot; height=&quot;26&quot; textpadding=&quot;6,6,6,6&quot; bkcolor=&quot;#FF666666&quot; nativebkcolor=&quot;#FF666666&quot; bkimage=&quot;res='common/edit_bk.png' corner='6,6,6,6'&quot;" />

  <VerticalLayout name="root" bkcolor="#FF202223" bkimage="file='png/bkimage.jpg'">
    <HorizontalLayout name="appbar" height="64" >
      <HorizontalLayout name="apptitle" childpadding="6">
        <Container width="64" height="64" bkimage="logo.jpg" />
        <VerticalLayout inset="0,10,0,0" childpadding="5">
          <Label name="title_lb" height="20" autocalcwidth="true" text="QQ:728297725" valign="vcenter" align="left" wordbreak="false" textcolor="#00000000" font="2" tooltip="duilib开源项目圈"/>
        </VerticalLayout>
      </HorizontalLayout>

      <HorizontalLayout inset="0,-1,0,0" float="true" height="30" width="100" floatalign="right,top" bordercolor="#FFFF0000" bordersize="0">
        <FadeButton name="minbtn" virtualwnd="mainpage" width="28" height="20" tooltip="最小化" normalimage="file='sysbtn/btn_mini_normal.png'" hotimage="file='sysbtn/btn_mini_highlight.png'" pushedimage="file='sysbtn/btn_mini_down.png' "/>
        <FadeButton name="maxbtn" virtualwnd="mainpage" width="28" height="20" tooltip="最大化" normalimage="file='sysbtn/btn_max_normal.png'" hotimage="file='sysbtn/btn_max_highlight.png'" pushedimage="file='sysbtn/btn_max_down.png' "/>
        <FadeButton name="restorebtn" virtualwnd="mainpage" width="28" height="20" tooltip="还原" visible="false" normalimage="file='sysbtn/btn_restore_normal.png'" hotimage="file='sysbtn/btn_restore_highlight.png'" pushedimage="file='sysbtn/btn_restore_down.png' "/>
        <FadeButton name="closebtn" virtualwnd="mainpage" width="39" height="20" tooltip="关闭" normalimage="file='sysbtn/btn_close_normal.png'" hotimage="file='sysbtn/btn_close_highlight.png'" pushedimage="file='sysbtn/btn_close_down.png' "/>
      </HorizontalLayout>

    </HorizontalLayout>

    <VerticalLayout name="body">
        <HorizontalLayout height="60" childvalign="vcenter">
            <Label text="输入控件" textcolor="#FF000000" glowsize="0" font="font13" width="80"/>
            <HorizontalLayout childvalign="vcenter" childpadding="12" hscrollbar="true" inset="5,5,5,5" bordersize="0" bordercolor="#ffff0000" borderround="28,28">
              <Edit name="edit1" tipvalue="普通输入框" style="edit_style" nativebkcolor="#00000000"/>
              <Edit name="edit2" tipvalue="只读输入框" text="只读控件" style="edit_style" align="center" readonly="true"/>
              <Edit name="edit3" tipvalue="数字输入框" style="edit_style" numberonly="true"/>
              <Edit name="edit4" tipvalue="密码输入框" style="edit_style" password="true" passwordchar="●"/>
            </HorizontalLayout>
          </HorizontalLayout>
    </VerticalLayout>
  </VerticalLayout>
</Window>

 

评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值