DuiLib学习(九)--按钮风格
2016-06-26 12:15
591 查看
教程:http://www.cnblogs.com/Alberl/p/3344936.html
资源:http://download.csdn.net/detail/qq316293804/6360473
知识点:
①Default必须放在 Window标签下
②Default中的value属性字符串不能换行
效果图:
xml:
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<Window size="800,600" sizebox="4,4,4,4" caption="0,0,0,32" mininfo="600,400">
<VerticalLayout width="800" height="600" bkcolor="#FFF0F0F0" bkcolor2="#FF00AAA0">
<HorizontalLayout height="32" bkcolor="#FFE6E6DC" bkcolor2="#FF00AAA0">
<HorizontalLayout height="32" />
<HorizontalLayout width="77" height="32">
<Button name="minbtn" tooltip="最小化" float="true" pos="0,5,0,0" width="23" height="19" textcolor="#FF000000" disabledtextcolor="#FFA7A6AA" align="center" normalimage="file='SysBtn/MinNormal.bmp'" hotimage="file='SysBtn/MinFocus.bmp'" />
<Button name="maxbtn" tooltip="最大化" float="true" pos="22,5,0,0" width="23" height="19" textcolor="#FF000000" disabledtextcolor="#FFA7A6AA" align="center" normalimage="file='SysBtn/MaxNormal.bmp'" hotimage="file='SysBtn/MaxFocus.bmp'" />
<Button name="restorebtn" tooltip="还原" visible="false" float="true" pos="22,5,0,0" width="23" height="19" align="center" normalimage="file='SysBtn/StoreNormal.bmp'" hotimage="file=‘SysBtn/StoreFocus.bmp’" />
<Button name="closebtn" tooltip="关闭" float="true" pos="44,5,0,0" width="28" height="19" textcolor="#FF000000" disabledtextcolor="#FFA7A6AA" align="center" normalimage="file='SysBtn/CloseNormal.bmp'" hotimage="file='SysBtn/CloseFocus.bmp'" />
</HorizontalLayout>
</HorizontalLayout>
<HorizontalLayout>
<Button text="XP" float="true" pos="22,32,0,0" width="60" height="25" textcolor="#FF000000"
normalimage="file='BtnStyle\XP\button_nor.png'"
hotimage="file='BtnStyle\XP\button_over.png'"
pushedimage="file='BtnStyle\XP\button_down.png'"
focusedimage="file='BtnStyle\XP\button_focus.png'"
/>
<Button text="win7" float="true" pos="22,79,0,0" width="60" height="25" textcolor="#FF000000" disabledtextcolor="#FFA7A6AA" align="center"
normalimage="file='BtnStyle\win7\button_nor.png'"
hotimage="file='BtnStyle\win7\button_over.png'"
pushedimage="file='BtnStyle\win7\button_down.png'"
focusedimage="file='BtnStyle\win7\button_focus.png'"
/>
<Button text="百度杀毒" float="true" pos="22,126,0,0" width="102" height="35" textcolor="#FF000000" disabledtextcolor="#FFA7A6AA" align="center"
normalimage="file='BtnStyle\BDKV\button_nor.png'"
hotimage="file='BtnStyle\BDKV\button_over.png'"
pushedimage="file='BtnStyle\BDKV\button_down.png'"
focusedimage="file='BtnStyle\BDKV\button_focus.png'"
/>
<Button float="true" pos="22,175,0,0" width="171" height="46" textcolor="#FF000000" disabledtextcolor="#FFA7A6AA" align="center"
normalimage="file='BtnStyle\BDKV2\button_nor.png'"
hotimage="file='BtnStyle\BDKV2\button_over.png'"
pushedimage="file='BtnStyle\BDKV2\button_down.png'"
focusedimage="file='BtnStyle\BDKV2\button_focus.png'"
/>
</HorizontalLayout>
</VerticalLayout>
</Window>
效果图二:
XML二:
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<Window size="800,600" sizebox="4,4,4,4" caption="0,0,0,32" mininfo="600,400">
<Default name="Button" value=" height="25" width="60" normalimage="file='BtnStyle\XP\button_nor.png'" hotimage="file='BtnStyle\XP\button_over.png'" pushedimage="file='BtnStyle\XP\button_down.png'" focusedimage="file='BtnStyle\XP\button_focus.png'" " />
<VerticalLayout width="800" height="600" bkcolor="#FFF0F0F0" bkcolor2="#FF00AAA0">
<HorizontalLayout height="32" bkcolor="#FFE6E6DC" bkcolor2="#FF00AAA0">
<HorizontalLayout height="32" />
<HorizontalLayout width="77" height="32">
<Button name="minbtn" tooltip="最小化" float="true" pos="0,5,0,0" width="23" height="19" textcolor="#FF000000" disabledtextcolor="#FFA7A6AA" align="center" normalimage="file='SysBtn/MinNormal.bmp'" hotimage="file='SysBtn/MinFocus.bmp'" focusedimage="file='SysBtn/MinFocus.bmp'"/>
<Button name="maxbtn" tooltip="最大化" float="true" pos="22,5,0,0" width="23" height="19" textcolor="#FF000000" disabledtextcolor="#FFA7A6AA" align="center" normalimage="file='SysBtn/MaxNormal.bmp'" hotimage="file='SysBtn/MaxFocus.bmp'" />
<Button name="restorebtn" tooltip="还原" visible="false" float="true" pos="22,5,0,0" width="23" height="19" align="center" normalimage="file='SysBtn/StoreNormal.bmp'" hotimage="file=‘SysBtn/StoreFocus.bmp’" />
<Button name="closebtn" tooltip="关闭" float="true" pos="44,5,0,0" width="28" height="19" textcolor="#FF000000" disabledtextcolor="#FFA7A6AA" align="center" normalimage="file='SysBtn/CloseNormal.bmp'" hotimage="file='SysBtn/CloseFocus.bmp'" />
</HorizontalLayout>
</HorizontalLayout>
<HorizontalLayout>
<Button text="XP" float="true" pos="22,32,0,0" height="25" textcolor="#FF000000"
/>
<Button text="win7" float="true" pos="22,79,0,0" height="25" textcolor="#FF000000" disabledtextcolor="#FFA7A6AA" align="center"
/>
<Button text="百度杀毒" float="true" pos="22,126,0,0" height="35" textcolor="#FF000000" disabledtextcolor="#FFA7A6AA" align="center"
/>
<Button float="true" pos="22,175,0,0" height="46" textcolor="#FF000000" disabledtextcolor="#FFA7A6AA" align="center"
/>
</HorizontalLayout>
</VerticalLayout>
</Window>
资源:http://download.csdn.net/detail/qq316293804/6360473
知识点:
①Default必须放在 Window标签下
②Default中的value属性字符串不能换行
效果图:
xml:
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<Window size="800,600" sizebox="4,4,4,4" caption="0,0,0,32" mininfo="600,400">
<VerticalLayout width="800" height="600" bkcolor="#FFF0F0F0" bkcolor2="#FF00AAA0">
<HorizontalLayout height="32" bkcolor="#FFE6E6DC" bkcolor2="#FF00AAA0">
<HorizontalLayout height="32" />
<HorizontalLayout width="77" height="32">
<Button name="minbtn" tooltip="最小化" float="true" pos="0,5,0,0" width="23" height="19" textcolor="#FF000000" disabledtextcolor="#FFA7A6AA" align="center" normalimage="file='SysBtn/MinNormal.bmp'" hotimage="file='SysBtn/MinFocus.bmp'" />
<Button name="maxbtn" tooltip="最大化" float="true" pos="22,5,0,0" width="23" height="19" textcolor="#FF000000" disabledtextcolor="#FFA7A6AA" align="center" normalimage="file='SysBtn/MaxNormal.bmp'" hotimage="file='SysBtn/MaxFocus.bmp'" />
<Button name="restorebtn" tooltip="还原" visible="false" float="true" pos="22,5,0,0" width="23" height="19" align="center" normalimage="file='SysBtn/StoreNormal.bmp'" hotimage="file=‘SysBtn/StoreFocus.bmp’" />
<Button name="closebtn" tooltip="关闭" float="true" pos="44,5,0,0" width="28" height="19" textcolor="#FF000000" disabledtextcolor="#FFA7A6AA" align="center" normalimage="file='SysBtn/CloseNormal.bmp'" hotimage="file='SysBtn/CloseFocus.bmp'" />
</HorizontalLayout>
</HorizontalLayout>
<HorizontalLayout>
<Button text="XP" float="true" pos="22,32,0,0" width="60" height="25" textcolor="#FF000000"
normalimage="file='BtnStyle\XP\button_nor.png'"
hotimage="file='BtnStyle\XP\button_over.png'"
pushedimage="file='BtnStyle\XP\button_down.png'"
focusedimage="file='BtnStyle\XP\button_focus.png'"
/>
<Button text="win7" float="true" pos="22,79,0,0" width="60" height="25" textcolor="#FF000000" disabledtextcolor="#FFA7A6AA" align="center"
normalimage="file='BtnStyle\win7\button_nor.png'"
hotimage="file='BtnStyle\win7\button_over.png'"
pushedimage="file='BtnStyle\win7\button_down.png'"
focusedimage="file='BtnStyle\win7\button_focus.png'"
/>
<Button text="百度杀毒" float="true" pos="22,126,0,0" width="102" height="35" textcolor="#FF000000" disabledtextcolor="#FFA7A6AA" align="center"
normalimage="file='BtnStyle\BDKV\button_nor.png'"
hotimage="file='BtnStyle\BDKV\button_over.png'"
pushedimage="file='BtnStyle\BDKV\button_down.png'"
focusedimage="file='BtnStyle\BDKV\button_focus.png'"
/>
<Button float="true" pos="22,175,0,0" width="171" height="46" textcolor="#FF000000" disabledtextcolor="#FFA7A6AA" align="center"
normalimage="file='BtnStyle\BDKV2\button_nor.png'"
hotimage="file='BtnStyle\BDKV2\button_over.png'"
pushedimage="file='BtnStyle\BDKV2\button_down.png'"
focusedimage="file='BtnStyle\BDKV2\button_focus.png'"
/>
</HorizontalLayout>
</VerticalLayout>
</Window>
效果图二:
XML二:
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<Window size="800,600" sizebox="4,4,4,4" caption="0,0,0,32" mininfo="600,400">
<Default name="Button" value=" height="25" width="60" normalimage="file='BtnStyle\XP\button_nor.png'" hotimage="file='BtnStyle\XP\button_over.png'" pushedimage="file='BtnStyle\XP\button_down.png'" focusedimage="file='BtnStyle\XP\button_focus.png'" " />
<VerticalLayout width="800" height="600" bkcolor="#FFF0F0F0" bkcolor2="#FF00AAA0">
<HorizontalLayout height="32" bkcolor="#FFE6E6DC" bkcolor2="#FF00AAA0">
<HorizontalLayout height="32" />
<HorizontalLayout width="77" height="32">
<Button name="minbtn" tooltip="最小化" float="true" pos="0,5,0,0" width="23" height="19" textcolor="#FF000000" disabledtextcolor="#FFA7A6AA" align="center" normalimage="file='SysBtn/MinNormal.bmp'" hotimage="file='SysBtn/MinFocus.bmp'" focusedimage="file='SysBtn/MinFocus.bmp'"/>
<Button name="maxbtn" tooltip="最大化" float="true" pos="22,5,0,0" width="23" height="19" textcolor="#FF000000" disabledtextcolor="#FFA7A6AA" align="center" normalimage="file='SysBtn/MaxNormal.bmp'" hotimage="file='SysBtn/MaxFocus.bmp'" />
<Button name="restorebtn" tooltip="还原" visible="false" float="true" pos="22,5,0,0" width="23" height="19" align="center" normalimage="file='SysBtn/StoreNormal.bmp'" hotimage="file=‘SysBtn/StoreFocus.bmp’" />
<Button name="closebtn" tooltip="关闭" float="true" pos="44,5,0,0" width="28" height="19" textcolor="#FF000000" disabledtextcolor="#FFA7A6AA" align="center" normalimage="file='SysBtn/CloseNormal.bmp'" hotimage="file='SysBtn/CloseFocus.bmp'" />
</HorizontalLayout>
</HorizontalLayout>
<HorizontalLayout>
<Button text="XP" float="true" pos="22,32,0,0" height="25" textcolor="#FF000000"
/>
<Button text="win7" float="true" pos="22,79,0,0" height="25" textcolor="#FF000000" disabledtextcolor="#FFA7A6AA" align="center"
/>
<Button text="百度杀毒" float="true" pos="22,126,0,0" height="35" textcolor="#FF000000" disabledtextcolor="#FFA7A6AA" align="center"
/>
<Button float="true" pos="22,175,0,0" height="46" textcolor="#FF000000" disabledtextcolor="#FFA7A6AA" align="center"
/>
</HorizontalLayout>
</VerticalLayout>
</Window>
相关文章推荐
- 虚拟主机上部署安装TzuiCMS程序图文教程
- IOS Dev Intro - Subclass UIView to Render by Opengl ES
- UICollectionViewFlowLayout 默认值测试
- 用IntelliJ IDEA的GUI Designer写Swing程式
- zImage和UImage的区别
- UEFI和Legacy及UEFI+Legacy启动的区别
- 树莓派与arduino通信
- PAT 1007. Maximum Subsequence Sum (25)
- 不要依赖apue.h
- Require、require_once、include、include_once的区别?
- UIView 和 CALayer
- UISwitch
- Java中UUID的生成
- 使用TimeQuest时序分析器
- 用Quartus II Timequest Timing Analyzer进行时序分析 :实例讲解
- UIScrollView
- UIButton
- Mac下编译"Unix环境高级编程"的apue.h的错误解决
- Databus系统构想 Client端(一)
- UISearchBar