C# 클래스 CustomListView.ListViewEx

Class derived from ListView to give ability to display controls like TextBox and Combobox
상속: System.Windows.Forms.ListView
파일 보기 프로젝트 열기: powerumc/vsgesture

공개 메소드들

메소드 설명
AddComboBoxCell ( int row, int col, StringCollection data ) : void

Set a combobox in a cell

AddComboBoxCell ( int row, int col, string data ) : void

Set a combobox in a cell

AddEditableCell ( int row, int col ) : void

Set a text box in a cell

ListViewEx ( ) : System

Constructor

보호된 메소드들

메소드 설명
OnMouseDown ( MouseEventArgs e ) : void

OnMouseUp ( MouseEventArgs e ) : void

비공개 메소드들

메소드 설명
GetDropDownWidth ( StringCollection data ) : int

This message will get the largest text from the given stringarray, and will calculate the width of a control which will contain that text.

GetKey ( SubItem cell ) : SubItem

For this method, we will get a Subitem. Then we will iterate thru each of the keys and will check whther any key contains the given cells row/column. If it is not found we will check for -1 in any one

GetSubItemRect ( Point clickPoint ) : System.Windows.Forms.RECT

This method will send LVM_GETSUBITEMRECT message to get the current subitem bouds of the listview

InitializeComponent ( ) : void

Initializes the text box and combo box

ShowComboBox ( Point location, Size sz, StringCollection data ) : void

This method will display the combobox

ShowTextBox ( Point location, Size sz ) : void

This method will display the textbox

ValidateAndAddSubItems ( ) : void

combo_SelectedIndexChanged ( object sender, EventArgs e ) : void

This event handler wll set the current text in the combobox as the listview's current cell's text, while the combobox selection is changed

textBox_Leave ( object sender, EventArgs e ) : void

This event handler wll set the current text in the textbox as the listview's current cell's text, while the textbox focus is lost

메소드 상세

AddComboBoxCell() 공개 메소드

Set a combobox in a cell
public AddComboBoxCell ( int row, int col, StringCollection data ) : void
row int The 0-based index of the item. Give -1 if you /// want to set a combo box for every items for a /// given "col" variable. ///
col int The 0-based index of the column. Give -1 if you /// want to set a combo box for every subitems for a /// given "row" variable. ///
data System.Collections.Specialized.StringCollection Items of the combobox ///
리턴 void

AddComboBoxCell() 공개 메소드

Set a combobox in a cell
public AddComboBoxCell ( int row, int col, string data ) : void
row int The 0-based index of the item. Give -1 if you /// want to set a combo box for every items for a /// given "col" variable. ///
col int The 0-based index of the column. Give -1 if you /// want to set a combo box for every subitems for a /// given "row" variable. ///
data string Items of the combobox ///
리턴 void

AddEditableCell() 공개 메소드

Set a text box in a cell
public AddEditableCell ( int row, int col ) : void
row int The 0-based index of the item. Give -1 if you /// want to set a text box for every items for a /// given "col" variable. ///
col int The 0-based index of the column. Give -1 if you /// want to set a text box for every subitems for a /// given "row" variable. ///
리턴 void

ListViewEx() 공개 메소드

Constructor
public ListViewEx ( ) : System
리턴 System

OnMouseDown() 보호된 메소드

protected OnMouseDown ( MouseEventArgs e ) : void
e MouseEventArgs
리턴 void

OnMouseUp() 보호된 메소드

protected OnMouseUp ( MouseEventArgs e ) : void
e MouseEventArgs
리턴 void