zoukankan
html css js c++ java
贴两段代码
因为没有找到如何在ComboBox和ListBox中的item附加tag的办法,所以自己添加了一下。主要是试验一下如何用博客园新加的代码高亮这个酷酷的功能:
public
class
FlexComboBox : System.Windows.Forms.ComboBox
{
private
System.Collections.ArrayList ItemValues
=
new
System.Collections.ArrayList();
public
void
FlexAddItem(
string
itemText,
object
itemValue)
{
this
.Items.Add(itemText);
ItemValues.Add(itemValue);
}
public
object
FlexGetSelectedItemValue()
{
return
ItemValues[
this
.SelectedIndex];
}
public
void
FlexClearItems()
{
ItemValues.Clear();
this
.Items.Clear();
}
}
public
class
FlexListBox : System.Windows.Forms.ListBox
{
private
ArrayList itemValues
=
new
ArrayList();
public
FlexListBox()
{ }
public
void
FlexAddItem(
string
itemText,
object
itemValue)
{
this
.Items.Add(itemText);
itemValues.Add(itemValue);
}
public
void
FlexRemoveSelectedItems()
{
for
(
int
i
=
0
;i
<
this
.SelectedIndices.Count;i
++
)
{
int
index
=
this
.SelectedIndices[i];
this
.Items.RemoveAt(index);
itemValues.RemoveAt(index);
}
}
public
void
FlexClearItems()
{
itemValues.Clear();
this
.Items.Clear();
}
public
ArrayList FlexGetItemValues()
{
return
itemValues;
}
public
object
FlexGetSelectedValue()
{
return
itemValues[
this
.SelectedIndex];
}
}
查看全文
相关阅读:
js窗口拖动 模版
js中准确判断数据类型的方法
ArcGis Python脚本——批量对影像、要素类定义投影
ArcGis 属性表.dbf文件使用Excel打开中文乱码的解决方法
解析ArcGis拓扑——根据拓扑错误记录提取shp文件、导出Excel表格
解析ArcGis拓扑——检查的流程,以面重叠检查为例
ArcGis Classic COM Add-Ins插件开发的一般流程 C#
解析ArcGis的标注(三)——标注的放置 与 转注记修改
解析ArcGis的标注(二)——认识ArcGis标注标签
解析ArcGis的标注(一)——先看看分数式、假分数式标注是怎样实现的
原文地址:https://www.cnblogs.com/taowen/p/21165.html
最新文章
Ubuntu上安装mono
Asp.NET获取文件及其路径
《HTTP
2018/05/28 为什么说代码缩进一定要一致
2018/05/18 数据库 视图
Beanstalkd 基本概念和使用
2018/05/11 PHP 设计模式之 适配器模式
《Nginx
《设计模式
2018/05/07 Linux find命令中{}的作用
热门文章
2018/05/02 PHP 之错误与异常处理
2018/05/02 每日一学Linux 之 .bash_profile和.bashrc的区别
MVC的好处 演示
MVC 模型 视图, 控制器 写 三级联动
js三级联动
关于 动画旋转 的两个属性
导航菜单划过显示中线条
数组Arry的随机排序
each遍历 的原理
js轮播图
Copyright © 2011-2022 走看看