效果如下所示:
界面如下所示:
<?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="btnstyle_queding" shared="true" value="stateimage="res='common/queding.png' corner='6,6,6,6'" statecount="3" width="59" height="23" tooltip="确定"" />
<Style name="btnstyle_quxiao" shared="true" value="stateimage="res='common/quxiao.png'" statecount="3" width="59" height="23" tooltip="取消"" />
<Style name="option_style" value="cursor="hand" align="left" valign="vcenter" textcolor="#FFAFADAD" hottextcolor="#FFFFFFFF" textpadding="20,0,6,0""/>
<Style name="main_tab" value="textcolor="#FF386382" font="2" normalimage="tabbar_normal.png" hotimage="tabbar_hover.png" pushedimage="tabbar_pushed.png" selectedimage="tabbar_pushed.png" group="tab_header" " />
<Style name="colortab_style" shared="true" value="textcolor="#FFAFADAD" hottextcolor="#FFFFFFFF" selectedtextcolor="#FFFFFFFF" textpadding="6,0,6,0" bkcolor="#FF2c2c2c" hotbkcolor="#FF4b4b4b" pushedbkcolor="#FF424242" selectedbkcolor="#FF424242" group="tab_header"" />
<Style name="combo_style" value="height="28" textcolor="#FFFFFFFF" itemvalign="vcenter" textpadding="4,1,28,1" normalimage="res='common/combo.png' source='0,0,161,28' corner='2,2,28,2'" hotimage="res='common/combo.png' source='0,28,161,56' corner='2,2,28,2'" pushedimage="res='common/combo.png' source='0,56,161,84' corner='2,2,28,2'"" />
<Style name="list_style" value="headerbkimage="res='common/list_header_bg.png'" itemalign="center" itemlinecolor="#FF888888" itemshowrowline="true" itemshowcolumnline="true"" />
<Style name="edit_style" value="width="200" height="26" textpadding="6,6,6,6" bkcolor="#FF666666" nativebkcolor="#FF666666" bkimage="res='common/edit_bk.png' corner='6,6,6,6'"" />
<Style name="btn_style" value="drag="false" height="30" textpadding="6,0,6,0" normalimage="res='common/button_normal.png' corner='4,4,4,4'" hotimage="res='common/button_hover.png' corner='4,4,4,4'" pushedimage="res='common/button_pushed.png' corner='4,4,4,4'" focusedimage1="res='common/button_pushed.png' corner='4,4,4,4'" selectedimage="res='common/button_pushed.png' corner='4,4,4,4'"" />
<Style name="treenode_folder_style" value="padding="16,1,0,0" width="16" height="16" normalimage="file='common/treeview_b.png' source='0,0,16,16' " hotimage="file='common/treeview_b.png' source='16,0,32,16' " selectedimage="file='common/treeview_a.png' source='0,0,16,16' " selectedhotimage="file='common/treeview_a.png' source='16,0,32,16' ""/>
<Style name="treenode_checkbox_style" value="width="16" height="16" normalimage="file='common/unchecked.png' " selectedimage="file='common/checked.png'"" />
<Style name="treeview_item_style" value="folderattr="treenode_folder_style" checkboxattr="treenode_checkbox_style""/>
<Style name="listex_item_style" value="checkboxwidth="16" checkboxheight="16" checkboxnormalimage="file='common/unchecked.png'" checkboxselectedimage="file='common/checked.png'""/>
<Style name="colorbtn_style" shared="true" value="textcolor="#FFAFADAD" hottextcolor="#FFFFFFFF" textpadding="6,0,6,0" bkcolor="#FF2c2c2c" hotbkcolor="#FF4b4b4b" pushedbkcolor="#FF424242"" />
<Style name="cb_style" shared="true" value="style="option_style" height="16" normalimage="res='common/cb_normal.png' dest='0,0,16.16'" hotimage="res='common/cb_hot.png' dest='0,0,16.16'" pushedimage="res='common/cb_pushed.png' dest='0,0,16.16'" selectedimage="res='common/cb_selected.png' dest='0,0,16,16'"" />
<Style name="radio_style" shared="true" value="style="option_style" height="17" stateimage="res='common/radio_normal.png' dest='0,0,17,17'" statecount="2" selectedstateimage="res='common/radio_selected.png' dest='0,0,17,17'" selectedstatecount="2"" />
<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">
<VerticalLayout>
<TreeView name="treeview" bkcolor="#ffffffff" visiblefolderbtn="true" visiblecheckbtn="false" vscrollbar="true" >
<TreeNode text="A1" itemattr="visible="true" font="3"" innerstyle="folderattr="treenode_folder_style" checkboxattr="treenode_checkbox_style"">
<TreeNode text="B1" innerstyle="selitemtextcolor="#FFFF0000" folderattr="treenode_folder_style" checkboxattr="treenode_checkbox_style"" itemattr="font="3"" >
</TreeNode>
</TreeNode>
<TreeNode text="A2" itemtextcolor="#FFFF0000" itemattr="font="3"" innerstyle="folderattr="treenode_folder_style" checkboxattr="treenode_checkbox_style"">
<TreeNode text="B2" dotlineattr="font="3"" itemattr="font="3"" innerstyle="folderattr="treenode_folder_style" checkboxattr="treenode_checkbox_style"">
</TreeNode>
</TreeNode>
</TreeView>
</VerticalLayout>
</VerticalLayout>
</VerticalLayout>
</Window>