Smobiler上海石磨_.NET移动开发平台
标题:
Smobiler平台上如何实现类似Commbox下拉选择效果?
[打印本页]
作者:
vicky
时间:
2016-1-12 19:04
标题:
Smobiler平台上如何实现类似Commbox下拉选择效果?
如题,如何实现类似Commbox下拉选择效果?
作者:
vicky
时间:
2016-1-12 19:13
可以使用PopList来进行选择。
效果界面如下图所示:
[attach]452[/attach]
第一步:在工具箱中选择PopList拖拽到界面,因为PopList是组件,在组件栏显示
[attach]453[/attach]
第二步:PopList组件需要有按钮或者其他控件来对它进行调用。比如我们拖入一个button按钮,在在button的click事件中直接写this.poplist1.show()或者this.poplist1.showdialog()即可。
[attach]454[/attach]
第三步:可以通过设计器或在代码中添加PopList中的内容
[attach]455[/attach]
注:PopList的MultiSelect属性设置为true时,可进行多项选择。
作者:
Lincy.Lin
时间:
2016-5-23 10:07
poplist给
lable
控件赋值,如下
private void PopList1_Selected(object sender, EventArgs e)
{
try
{
//单项选择lable控件赋值
if (PopList1.Selection != null)
{
this.Label1.Text = PopList1.Selection.Text;
}
//多项选择lable控件赋值
//if (PopList1.Selections != null)
//{
// foreach (PopListItem poitem in PopList1.Selections)
// {
// this.Label1.Text = poitem.Text ;
// }
//}
}
catch (Exception ex)
{
MessageBox.Show(ex.Message);
}
}
复制代码
欢迎光临 Smobiler上海石磨_.NET移动开发平台 (https://www.smobiler.com/)
Powered by Discuz! X3.2