输入框:
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="8" showbutton1="false" showbutton2="false" thumbnormalimage="file='common/vscrollbar.png' source='0,60,8,100' corner='0,4,0,4'" thumbhotimage="file='common/vscrollbar.png' source='8,60,16,100' corner='0,4,0,4'" thumbpushedimage="file='common/vscrollbar.png' source='16,60,24,100' corner='0,4,0,4'" railnormalimage="" railhotimage="" railpushedimage="" raildisabledimage="" bknormalimage="file='common/vscrollbar.png' source='0,0,8,60' corner='0,4,0,4'" bkhotimage="" bkpushedimage="" bkdisabledimage="" "/>
<Default name="HScrollBar" shared="true" value="height="8" showbutton1="false" showbutton2="false" thumbnormalimage="file='common/hscrollbar.png' source='0,0,32,8' corner='4,0,4,0'" thumbhotimage="file='common/hscrollbar.png' source='0,8,32,16' corner='4,0,4,0'" thumbpushedimage="file='common/hscrollbar.png' source='0,16,32,24' corner='4,0,4,0'" railnormalimage="" railhotimage="" railpushedimage="" raildisabledimage="" bknormalimage="file='common/hscrollbar.png' source='0,0,32,8' corner='4,0,4,0'" bkhotimage="" bkpushedimage="" bkdisabledimage="" "/>
<Style name="edit_style" value="width="100" height="26" textpadding="6,6,6,6" bkcolor="#FF666666" nativebkcolor="#FF666666" bkimage="res='common/edit_bk.png' corner='6,6,6,6'"" />
<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>