XML如下图所示
后来分析:
1.关键字为Combo
2.关键字为ListLabelElement
这两个关键字都写错了,导致,并没有组合框出现呢
3.对于组合框中子项只能有一个被选中,不能写两个
可以更改为如下的XML
<Combo name="sig_age_com" float="true" pos="260,170,0,0" width="70" height="50" bkcolor="00000000" >
<ListLabelElement text="张三" selected ="true" />
<ListLabelElement text="李四" />
</Combo>
如果组合框没有贴图时,只能得到下图的结果
对应的XML为:
<Combo name="sig_age_com" float="true" pos="260,170,0,0" width="170" height="19" bkcolor="ff372f30" dropboxsize="0,150">
<ListLabelElement text="张三" selected ="true" />
<ListLabelElement text="李四1" />
<ListLabelElement text="李四2" />
<ListLabelElement text="李四3" />
<ListLabelElement text="李四4" />
<ListLabelElement text="李四5" />
<ListLabelElement text="李四6" />
</Combo>
有贴图时
对应的XML为
<Combo name="sig_age_com" float="true" pos="260,170,0,0" width="170" height="19" bkcolor="ff372f30" normalimage="file='Combo_nor.bmp' corner='2,2,24,2'" hotimage="file='Combo_over.bmp' corner='2,2,24,2'" pushedimage="file='Combo_over.bmp' corner='2,2,24,2'" dropboxsize="0,150">
<ListLabelElement text="张三" selected ="true" />
<ListLabelElement text="李四1" />
<ListLabelElement text="李四2" />
<ListLabelElement text="李四3" />
<ListLabelElement text="李四4" />
<ListLabelElement text="李四5" />
<ListLabelElement text="李四6" />
</Combo>
组合框没有滚动条
上面的图片中,组合框中并没有滚动条,怎么解决呢
debug和点击exe时 组合框的显示不一样
XML一样,均为
<Combo name="sig_age_com" float="true" pos="260,170,0,0" width="170" height="19" bkcolor="ff372f30" normalimage="file='Combo_nor.bmp' corner='2,2,24,2'" hotimage="file='Combo_over.bmp' corner='2,2,24,2'" pushedimage="file='Combo_over.bmp' corner='2,2,24,2'" vscrollbar="true" dropboxsize="0,150">
<ListLabelElement text="张三" selected ="true" />
<ListLabelElement text="李四1" />
<ListLabelElement text="李四2" />
<ListLabelElement text="李四3" />
<ListLabelElement text="李四4" />
<ListLabelElement text="李四5" />
<ListLabelElement text="李四6" />
</Combo>
- 点击exe时图片为:
- 点击debug时
原因为:debug下资源路径与bin下exe的资源路径不一致,设置为路径一致就可以了啊