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

输入框:

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>

 

已标记关键词 清除标记
相关推荐
©️2020 CSDN 皮肤主题: 大白 设计师:CSDN官方博客 返回首页