资源简介
winform下拉多选自定义控件(带全选).zip
代码片段和文件信息
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Diagnostics;
namespace UserControlDLL
{
///
/// 带下拉框的用户控件
///
public partial class ComCheckBoxList : UserControl
{
private TextBox tbSelectedValue;
private ButtonS btnSelect;//下拉箭头
private LabelS lbGrip;//此LABEL用于设置可以拖动下拉窗体变化
private CheckedListBox checkListBox;
private Label lbSelectAll;//全选
private Label lbSelectNo;//取消
private Form frmCheckList;
private Panel pnlBack;
private Panel pnlCheck;
private System.Drawing.Point DragOffset; //用于记录窗体大小变化的位置
//单击列表项状态更改事件
public delegate void CheckBoxListItemClick(object sender ItemCheckEventArgs e);
public event CheckBoxListItemClick ItemClick;
public ComCheckBoxList()
{
InitializeComponent();
this.Name = “comBoxCheckBoxList“;
this.Layout+=new LayoutEventHandler(ComCheckBoxList_Layout);
//生成控件
tbSelectedValue = new TextBox();
tbSelectedValue.ReadOnly = true;
tbSelectedValue.Borderstyle = Borderstyle.None;
//下拉箭头
this.btnSelect = new ButtonS();
btnSelect.Flatstyle = Flatstyle.Flat;
btnSelect.Click+=new EventHandler(btnSelect_Click);
//全选
this.lbSelectAll = new Label();
lbSelectAll.BackColor = Color.Transparent;
lbSelectAll.Text = “全选“;
lbSelectAll.Size = new Size(40 20);
lbSelectAll.ForeColor = Color.Blue;
lbSelectAll.Cursor = Cursors.Hand ;
lbSelectAll.TextAlign = ContentAlignment.MiddleCenter;
lbSelectAll.Click+=new EventHandler(lbSelectAll_Click);
//取消
lbSelectNo = new Label();
lbSelectNo.BackColor = Color.Transparent;
lbSelectNo.Text = “取消“;
lbSelectNo.Size = new Size(40 20);
lbSelectNo.ForeColor = Color.Blue;
lbSelectNo.Cursor = Cursors.Hand;
lbSelectNo.TextAlign = ContentAlignment.MiddleCenter;
lbSelectNo.Click+=new EventHandler(lbSelectNo_Click);
//生成checkboxlist
this.checkListBox = new CheckedListBox();
checkListBox.Borderstyle = Borderstyle.None;
checkListBox.Location = new Point(00);
checkListBox.Checkonclick = true;
checkListBox.ScrollAlwaysVisible = true;
checkListBox.LostFocus +=new EventHandler(checkListBox_LostFocus);
checkListBox.ItemCheck+=new ItemCheckEventHandler(checkListBox_ItemCheck);
//窗体
frmCheckList = new Form();
frmCheckList.FormBorderstyle = FormBorderstyle.
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
目录 0 2018-01-04 15:54 WinFormComCheckBoxList\
目录 0 2018-01-02 10:44 WinFormComCheckBoxList\WinFormComCheckBoxList\
目录 0 2018-01-02 10:44 WinFormComCheckBoxList\WinFormComCheckBoxList\.vs\
目录 0 2018-01-02 10:44 WinFormComCheckBoxList\WinFormComCheckBoxList\.vs\WinFormControl\
目录 0 2018-01-02 10:44 WinFormComCheckBoxList\WinFormComCheckBoxList\.vs\WinFormControl\v15\
文件 90624 2018-01-04 15:53 WinFormComCheckBoxList\WinFormComCheckBoxList\.vs\WinFormControl\v15\.suo
目录 0 2018-01-02 10:44 WinFormComCheckBoxList\WinFormComCheckBoxList\.vs\WinFormControl\v15\Server\
目录 0 2018-01-04 15:53 WinFormComCheckBoxList\WinFormComCheckBoxList\.vs\WinFormControl\v15\Server\sqlite3\
文件 0 2018-01-02 10:44 WinFormComCheckBoxList\WinFormComCheckBoxList\.vs\WinFormControl\v15\Server\sqlite3\db.lock
文件 1056768 2018-01-04 15:53 WinFormComCheckBoxList\WinFormComCheckBoxList\.vs\WinFormControl\v15\Server\sqlite3\storage.ide
文件 1542 2016-08-15 10:32 WinFormComCheckBoxList\WinFormComCheckBoxList\UpgradeLog.xm
目录 0 2018-01-04 15:53 WinFormComCheckBoxList\WinFormComCheckBoxList\UserControlDLL\
目录 0 2016-08-15 10:32 WinFormComCheckBoxList\WinFormComCheckBoxList\UserControlDLL\bin\
目录 0 2012-07-26 11:39 WinFormComCheckBoxList\WinFormComCheckBoxList\UserControlDLL\bin\Debug\
文件 18944 2018-01-04 15:51 WinFormComCheckBoxList\WinFormComCheckBoxList\UserControlDLL\bin\Debug\UserControlDLL.dll
文件 34304 2018-01-04 15:51 WinFormComCheckBoxList\WinFormComCheckBoxList\UserControlDLL\bin\Debug\UserControlDLL.pdb
目录 0 2016-08-15 10:32 WinFormComCheckBoxList\WinFormComCheckBoxList\UserControlDLL\bin\Release\
文件 15112 2018-01-04 15:53 WinFormComCheckBoxList\WinFormComCheckBoxList\UserControlDLL\ComCheckBoxList.cs
文件 1402 2018-01-02 10:50 WinFormComCheckBoxList\WinFormComCheckBoxList\UserControlDLL\ComCheckBoxList.Designer.cs
文件 5817 2018-01-02 10:50 WinFormComCheckBoxList\WinFormComCheckBoxList\UserControlDLL\ComCheckBoxList.resx
文件 4351 2012-07-23 13:18 WinFormComCheckBoxList\WinFormComCheckBoxList\UserControlDLL\DataGridViewButton.cs
文件 2175 2012-07-23 12:02 WinFormComCheckBoxList\WinFormComCheckBoxList\UserControlDLL\DataGridViewButton.Designer.cs
文件 6190 2012-07-23 12:02 WinFormComCheckBoxList\WinFormComCheckBoxList\UserControlDLL\DataGridViewButton.resx
目录 0 2012-07-23 11:44 WinFormComCheckBoxList\WinFormComCheckBoxList\UserControlDLL\obj\
目录 0 2018-01-04 13:46 WinFormComCheckBoxList\WinFormComCheckBoxList\UserControlDLL\obj\Debug\
文件 864 2018-01-04 12:02 WinFormComCheckBoxList\WinFormComCheckBoxList\UserControlDLL\obj\Debug\DesignTimeResolveAssemblyReferences.cache
文件 6811 2018-01-04 12:04 WinFormComCheckBoxList\WinFormComCheckBoxList\UserControlDLL\obj\Debug\DesignTimeResolveAssemblyReferencesInput.cache
文件 0 2018-01-04 12:02 WinFormComCheckBoxList\WinFormComCheckBoxList\UserControlDLL\obj\Debug\TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs
文件 0 2018-01-04 12:02 WinFormComCheckBoxList\WinFormComCheckBoxList\UserControlDLL\obj\Debug\TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs
文件 0 2018-01-04 12:02 WinFormComCheckBoxList\WinFormComCheckBoxList\UserControlDLL\obj\Debug\TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs
目录 0 2016-08-15 10:32 WinFormComCheckBoxList\WinFormComCheckBoxList\UserControlDLL\obj\Debug\TempPE\
............此处省略68个文件信息
相关资源
- c#下拉列表树形菜单,带伸缩节点
- C#美化ComboBox的源码,为下拉列表框着
- c# winform 窗体样式风格 多种漂亮好看
- C# Winform 视频流添加透明控件
- ASP.NET 服务器控件:DropDownCheckBoxList
- winform-下拉框多选
- C# 自定义ComboBox显示颜色下拉框
- C# 自定义带搜索下拉框
- C# winform datagridview 里的下拉框中 既可
- WPF自定义文本下拉框模仿百度搜索
- WPF中支持检索的双列下拉框
- WPF-DataGrid中CheckBox实现全选与非全选
- 用WPF实现多选下拉框
- 11 如何在工具栏添加下拉菜单.rar
- Autocomplete(自动完成 下拉提示框Aja
- c# 读取数据到下拉列表框
- 复选下拉框用于Gridview筛选
- Asp.NetC#创建Excel,动态给下拉框赋值
- c#记事本源码新建、保存、另存为、打
- c# DataGridView中添加下拉列表
- C#textbox下拉提示 textbox智能提示 te
- C# winform ListView 中实现可编辑文本或双
- 完美实现ComBox多列下拉框+自动完成
- C# DataGridView DataGridViewColumn 扩展操作列
- c# winform自定义下拉列表源码
- WPF 下拉列表框ComboBox扩展控件
- C#中国地区三级联动下拉菜单
- winform左侧导航菜单(可伸缩折叠)
- winform ComboBox 下拉框 显示图片效果
- 带CheckBox列头的DataGridView 支持全选 反
评论
共有 条评论