Duilib--中Combox组合框的不显示

控件练习

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=&apos;Combo_nor.bmp&apos; corner=&apos;2,2,24,2&apos;" hotimage="file=&apos;Combo_over.bmp&apos; corner=&apos;2,2,24,2&apos;" pushedimage="file=&apos;Combo_over.bmp&apos; corner=&apos;2,2,24,2&apos;" 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=&apos;Combo_nor.bmp&apos; corner=&apos;2,2,24,2&apos;" hotimage="file=&apos;Combo_over.bmp&apos; corner=&apos;2,2,24,2&apos;" pushedimage="file=&apos;Combo_over.bmp&apos; corner=&apos;2,2,24,2&apos;" 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的资源路径不一致,设置为路径一致就可以了啊

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 2
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值