C# 클래스 BrightIdeasSoftware.ObjectListView

상속: System.Windows.Forms.ListView, ISupportInitialize
파일 보기 프로젝트 열기: soywiz/cspspemu 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
EditorRegistry EditorRegistry
SortAscendingImage Bitmap
SortDescendingImage Bitmap

Private Properties

프로퍼티 타입 설명
AddCheckStateBitmap void
ApplyHyperlinkStyle void
BuildBeforeSortingEventArgs BrightIdeasSoftware.BeforeSortingEventArgs
BuildCellEvent void
CalculateCellBounds System.Drawing.Rectangle
CalculateCheckState CheckState
CalculateToggledCheckState CheckState
ColumnSelectMenuClosing void
ColumnSelectMenuItemClicked void
DoSort void
FindGlassPanelForOverlay GlassPanelForm
GetCheckedObject object
GetCheckedObjects ArrayList
GetFirstNonNullValue object
GetSelectedObject object
GetSelectedObjects ArrayList
HandleHeaderRightClick bool
HandleModelOnPropertyChanged void
HeaderToolTipShowingCallback void
LowLevelScroll void
MakeResizedImage Bitmap
MakeResizedImageList ImageList
MakeSubItem OLVListSubItem
MakeTriangleBitmap Bitmap
PrepareAlternateBackColors void
RememberDisplayIndicies void
RunWhenIdle void
SetAllSubItemImages void
SetGroupSpacing void
SetupBaseImageList void
ShouldShowOverlays bool
ShowColumnCommandMenu void
ShowColumnSelectMenu void
StateToString string
SubscribeNotifications void
ToggleSelectedRowCheckBoxes void
UnsubscribeNotifications void

공개 메소드들

메소드 설명
AddDecoration ( IDecoration decoration ) : void

Add the given decoration to those on this list and make it appear

A decoration scrolls with the listview. An overlay stays fixed in place.

AddObject ( object modelObject ) : void

Add the given model object to this control.

See AddObjects() for more details

AddObjects ( ICollection modelObjects ) : void

Add the given collection of model objects to this control.

The added objects will appear in their correct sort position, if sorting is active (i.e. if LastSortColumn is not null). Otherwise, they will appear at the end of the list.

No check is performed to see if any of the objects are already in the ListView.

Null objects are silently ignored.

AddOverlay ( IOverlay overlay ) : void

Add the given overlay to those on this list and make it appear

AutoResizeColumns ( ) : void

Resize the columns to the maximum of the header width and the data.

BuildGroups ( ) : void

Organise the view items into groups, based on the last sort column or the first column if there is no last sort column

BuildGroups ( OLVColumn column, SortOrder order ) : void

Organise the view items into groups, based on the given column

If the AlwaysGroupByColumn property is not null, the list view items will be organisd by that column, and the 'column' parameter will be ignored.

This method triggers sorting events: BeforeSorting and AfterSorting.

BuildGroups ( OLVColumn groupByColumn, SortOrder groupByOrder, OLVColumn column, SortOrder order, OLVColumn secondaryColumn, SortOrder secondaryOrder ) : void

Organise the view items into groups, based on the given columns

This method does not trigger sorting events. Use BuildGroups() to do that

BuildList ( ) : void

Build/rebuild all the list view items in the list, preserving as much state as is possible

BuildList ( bool shouldPreserveState ) : void

Build/rebuild all the list view items in the list

Use this method in situations were the contents of the list is basically the same as previously.

CalculateCellBounds ( BrightIdeasSoftware.OLVListItem item, int subItemIndex ) : Rectangle

Return the bounds of the given cell

CalculateCellEditorBounds ( BrightIdeasSoftware.OLVListItem item, int subItemIndex, Size preferredSize ) : Rectangle

Calculate the bounds of the edit control for the given item/column

CalculateCellTextBounds ( BrightIdeasSoftware.OLVListItem item, int subItemIndex ) : Rectangle

Return the bounds of the given cell only until the edge of the current text

CalculateReasonableTileSize ( ) : void

Give the listview a reasonable size of its tiles, based on the number of lines of information that each tile is going to display.

CancelCellEdit ( ) : void

Stop editing a cell and throw away any changes.

ChangeToFilteredColumns ( View view ) : void

Rebuild this list for the given view

CheckIndeterminateObject ( object modelObject ) : void

Mark the given object as indeterminate check state

CheckIndeterminateSubItem ( object rowObject, OLVColumn column ) : void

Put an indeterminate check into the check box at the given cell

CheckObject ( object modelObject ) : void

Mark the given object as checked in the list

CheckObjects ( IEnumerable modelObjects ) : void

Mark the given objects as checked in the list

CheckSubItem ( object rowObject, OLVColumn column ) : void

Put a check into the check box at the given cell

ClearHotItem ( ) : void

Force the hot item to be recalculated

ClearObjects ( ) : void

Remove all items from this list

ClearUrlVisited ( ) : void

Reset the memory of which URLs have been visited

ConfigureAutoComplete ( TextBox tb, OLVColumn column ) : void

Configure the given text box to autocomplete unique values from the given column. At most 1000 rows will be considered.

ConfigureAutoComplete ( TextBox tb, OLVColumn column, int maxRows ) : void

Configure the given text box to autocomplete unique values from the given column. At most 1000 rows will be considered.

CopyObjectsToClipboard ( IList objectsToCopy ) : void

Copy a text and html representation of the given objects onto the clipboard.

CopySelectionToClipboard ( ) : void

Copy a text and html representation of the selected rows onto the clipboard.

Be careful when using this with virtual lists. If the user has selected 10,000,000 rows, this method will faithfully try to copy all of them to the clipboard. From the user's point of view, your program will appear to have hung.

CreateColumnFilter ( ) : IModelFilter

Create a filter that will enact all the filtering currently installed on the visible columns.

DeselectAll ( ) : void

Deselect all rows in the listview

DropSinkCanDrop ( object sender, OlvDropEventArgs e ) : void
DropSinkDropped ( object sender, OlvDropEventArgs e ) : void
DropSinkModelCanDrop ( object sender, ModelDropEventArgs e ) : void
DropSinkModelDropped ( object sender, ModelDropEventArgs e ) : void
EditSubItem ( OLVListItem item, int subItemIndex ) : void

Begin an edit operation on the given cell.

This performs various sanity checks and passes off the real work to StartCellEdit().

EnableCustomSelectionColors ( ) : void

Setup the list so it will draw selected rows using custom colours.

This method makes the list owner drawn, and ensures that all columns have at least a BaseRender installed.

EnsureGroupVisible ( ListViewGroup lvg ) : void

Scroll the listview so that the given group is at the top.

If the group is already visible, the list will still be scrolled to move the group to the top, if that is possible.

This only works when the list is showing groups (obviously).

This does not work on virtual lists, since virtual lists don't use ListViewGroups for grouping. Use VirtualObjectListView.EnsureNthGroupVisible instead.

EnsureModelVisible ( Object modelObject ) : void

Ensure that the given model object is visible

EnumerableToArray ( IEnumerable collection, bool alwaysCreate ) : ArrayList

Convert the given enumerable into an ArrayList as efficiently as possible

When we move to .NET 3.5, we can use LINQ and not need this method.

FindMatchingRow ( string text, int start, SearchDirectionHint direction ) : int

Find the first row after the given start in which the text value in the comparison column begins with the given text. The comparison column is column 0, unless IsSearchOnSortColumn is true, in which case the current sort column is used.

The text comparison is a case-insensitive, prefix match. The search will search the every row until a match is found, wrapping at the end if needed.

FinishCellEdit ( ) : void

Finish the cell edit operation, writing changed data back to the model object

This method does not trigger a Validating event, so it always finishes the cell edit.

FinishCellEdit ( bool expectingCellEdit ) : void

Finish the cell edit operation, writing changed data back to the model object

This method does not trigger a Validating event, so it always finishes the cell edit.

Freeze ( ) : void

Freeze the listview so that it no longer updates itself.

Freeze()/Unfreeze() calls nest correctly

GetCellToolTip ( int columnIndex, int rowIndex ) : String

Return the tooltip that should be shown when the mouse is hovered over the given cell

GetColumn ( int index ) : OLVColumn

Return the column at the given index

GetColumn ( string name ) : OLVColumn

Return the column at the given title.

GetDisplayOrderOfItemIndex ( int itemIndex ) : int

Return the display index of the given listviewitem index. If the control is not grouped, the display order is the same as the sorted list order. But if the list is grouped, the display order is different.

GetFilteredColumns ( View view ) : List

Return a collection of columns that are visible to the given view. Only Tile and Details have columns; all other views have 0 columns.

GetHeaderToolTip ( int columnIndex ) : String

Return the tooltip that should be shown when the mouse is hovered over the given column

GetItem ( int index ) : OLVListItem

Return the item at the given index

GetItemAt ( int x, int y, OLVColumn &hitColumn ) : OLVListItem

Find the item and column that are under the given co-ords

GetItemCount ( ) : int

Return the number of items in the list

GetLastItemInDisplayOrder ( ) : OLVListItem

Return the last item in the order they are shown to the user. If the control is not grouped, the display order is the same as the sorted list order. But if the list is grouped, the display order is different.

GetModelObject ( int index ) : object

Return the model object at the given index

GetNextItem ( OLVListItem itemToFind ) : OLVListItem

Return the ListViewItem that appears immediately after the given item. If the given item is null, the first item in the list will be returned. Return null if the given item is the last item.

GetNthItemInDisplayOrder ( int n ) : OLVListItem

Return the n'th item (0-based) in the order they are shown to the user. If the control is not grouped, the display order is the same as the sorted list order. But if the list is grouped, the display order is different.

GetPreviousItem ( OLVListItem itemToFind ) : OLVListItem

Return the ListViewItem that appears immediately before the given item. If the given item is null, the last item in the list will be returned. Return null if the given item is the first item.

GetSubItem ( int index, int columnIndex ) : OLVListSubItem

Return the sub item at the given index/column

HasDecoration ( IDecoration decoration ) : bool

Is the given decoration shown on this list

HasOverlay ( IOverlay overlay ) : bool

Is the given overlay shown on this list?

HideOverlays ( ) : void

Hide any overlays.

This is only a temporary hiding -- the overlays will be shown the next time the ObjectListView redraws.

HitTest ( int x, int y ) : ListViewHitTestInfo

Calculate what item is under the given point?

ISupportInitialize ( ) : void
IndexOf ( Object modelObject ) : int

Find the given model object within the listview and return its index

InsertObjects ( int index, ICollection modelObjects ) : void

Insert the given collection of objects before the given position

This operation only makes sense of non-sorted, non-grouped lists, since any subsequent sort/group operation will rearrange the list.

This method only works on ObjectListViews and FastObjectListViews.

IsChecked ( object modelObject ) : bool

Return true of the given object is checked

If the given object is not in the list, this method returns false.

IsCheckedIndeterminate ( object modelObject ) : bool

Return true of the given object is indeterminately checked

If the given object is not in the list, this method returns false.

IsEnumerableEmpty ( IEnumerable collection ) : bool
IsSelected ( object model ) : bool

Return true if the row representing the given model is selected

IsSubItemChecked ( object rowObject, OLVColumn column ) : bool

Is there a check at the check box at the given cell

IsUrlVisited ( string url ) : bool

Has the given URL been visited?

MakeColumnCommandMenu ( ToolStripDropDown strip, int columnIndex ) : ToolStripDropDown

Append the column selection menu items to the given menu strip.

MakeColumnSelectMenu ( ToolStripDropDown strip ) : ToolStripDropDown

Append the column selection menu items to the given menu strip.

MakeFilteringMenu ( ToolStripDropDown strip, int columnIndex ) : ToolStripDropDown

Create a Filtering menu

MarkUrlVisited ( string url ) : void

Remember that the given URL has been visited

This does not cause the control be redrawn

ModelToItem ( object modelObject ) : OLVListItem

Return the OLVListItem that displays the given model object

This method has O(n) performance.

MoveObjects ( int index, ICollection modelObjects ) : void

Move the given collection of objects to the given index.

This operation only makes sense on non-grouped ObjectListViews.

ObjectListView ( ) : System

Create an ObjectListView

ObjectsToHtml ( IList objectsToConvert ) : string

Return a html representation of the given objects

OlvHitTest ( int x, int y ) : OlvListViewHitTestInfo

What is under the given point? This takes the various parts of a cell into accout, including any custom parts that a custom renderer might use

PauseAnimations ( bool isPause ) : void

Pause (or unpause) all animations in the list

PossibleFinishCellEditing ( ) : bool

If a cell edit is in progress, finish the edit.

This method does not guarantee that the editing will finish. The validation process can cause the finishing to be aborted. Developers should check the return value or use IsCellEditing property after calling this method to see if the user is still editing a cell.

PossibleFinishCellEditing ( bool expectingCellEdit ) : bool

If a cell edit is in progress, finish the edit.

This method does not guarantee that the editing will finish. The validation process can cause the finishing to be aborted. Developers should check the return value or use IsCellEditing property after calling this method to see if the user is still editing a cell.

RebuildColumns ( ) : void

Rebuild the columns based upon its current view and column visibility settings

RefreshHotItem ( ) : void

Force the hot item to be recalculated

RefreshItem ( OLVListItem olvi ) : void

Update the ListViewItem with the data from its associated model.

This method does not resort or regroup the view. It simply updates the displayed data of the given item

RefreshObject ( object modelObject ) : void

Update the rows that are showing the given objects

This method does not resort or regroup the view.

RefreshObjects ( IList modelObjects ) : void

Update the rows that are showing the given objects

This method does not resort or regroup the view.

This method can safely be called from background threads.

RefreshOverlay ( IOverlay overlay ) : void

Refresh the display of just one overlays

RefreshOverlays ( ) : void

Refresh the display of the overlays

RefreshSelectedObjects ( ) : void

Update the rows that are selected

This method does not resort or regroup the view.

RemoveDecoration ( IDecoration decoration ) : void

Remove the given decoration from this list

RemoveObject ( object modelObject ) : void

Remove the given model object from the ListView

See RemoveObjects() for more details

This method is thread-safe.

RemoveObjects ( ICollection modelObjects ) : void

Remove all of the given objects from the control.

Nulls and model objects that are not in the ListView are silently ignored.

This method is thread-safe.

RemoveOverlay ( IOverlay overlay ) : void

Remove the given overlay to those on this list

Reset ( ) : void

Make the list forget everything -- all rows and all columns

Use ClearObjects if you want to remove just the rows.

ResetColumnFiltering ( ) : void

Remove all column filtering.

RestoreState ( byte state ) : bool

Restore the state of the control from the given string, which must have been produced by SaveState()

SaveState ( ) : byte[]

Return a byte array that represents the current state of the ObjectListView, such that the state can be restored by RestoreState()

The state of an ObjectListView includes the attributes that the user can modify: current view (i.e. Details, Tile, Large Icon...) sort column and direction column order column widths column visibility

It does not include selection or the scroll position.

SelectAll ( ) : void

Select all rows in the listview

SelectObject ( object modelObject ) : void

Select the row that is displaying the given model object, in addition to any current selection.

Use the SelectedObject property to deselect all other rows

SelectObject ( object modelObject, bool setFocus ) : void

Select the row that is displaying the given model object, in addition to any current selection.

Use the SelectedObject property to deselect all other rows

SelectObjects ( IList modelObjects ) : void

Select the rows that is displaying any of the given model object. All other rows are deselected.

SetNativeBackgroundImage ( Image image, int xOffset, int yOffset ) : void

Set the given image to be background of the ListView so that it appears at the given percentage offsets within the list.

This has the same limitations as described in SetNativeBackgroundWatermark. Make sure those limitations are understood before using the method.

This is very similar to setting the System.Windows.Forms.Control.BackgroundImage property of the standard .NET ListView, except that the standard BackgroundImage does not handle images with transparent areas properly -- it renders transparent areas as black. This method does not have that problem.

Setting this clears any background watermark.

SetNativeBackgroundTiledImage ( Image image ) : void

Set the given image to be the tiled background of the ListView.

This has the same limitations as described in SetNativeBackgroundWatermark and SetNativeBackgroundImage. Make sure those limitations are understood before using the method.

SetNativeBackgroundWatermark ( Image image ) : void

Set the given image to be fixed in the bottom right of the list view. This image will not scroll when the list view scrolls.

This method uses ListView's native ability to display a background image. It has a few limitations:

It doesn't work well with owner drawn mode. In owner drawn mode, each cell draws itself, including its background, which covers the background image. It doesn't look very good when grid lines are enabled, since the grid lines are drawn over the image. It does not work at all on XP. Obviously, it doesn't look good when alternate row background colors are enabled.

If you can live with these limitations, native watermarks are quite neat. They are true backgrounds, not translucent overlays like the OverlayImage uses. They also have the decided advantage over overlays in that they work correctly even in MDI applications.

Setting this clears any background image.

SetObjects ( IEnumerable collection ) : void

Set the collection of objects that will be shown in this list view.

The list is updated immediately

SetObjects ( IEnumerable collection, bool preserveState ) : void

Set the collection of objects that will be shown in this list view.

The list is updated immediately

SetSubItemImage ( int rowIndex, int subItemIndex, OLVListSubItem subItem, bool shouldClearImages ) : void

Set the subitem image natively

SetupSubItemCheckBoxes ( ) : void

Setup this control so it can display check boxes on subitems (or primary checkboxes in virtual mode)

This gives the ListView a small image list, if it doesn't already have one.

ShowOverlays ( ) : void

Make sure that any overlays are visible.

ShowSortIndicator ( ) : void

Put a sort indicator next to the text of the sort column

Sort ( ) : void

Sort the items by the last sort column and order

Sort ( OLVColumn columnToSort ) : void

Sort the items in the list view by the values in the given column and the last sort order

Sort ( OLVColumn columnToSort, SortOrder order ) : void

Sort the items in the list view by the values in the given column and by the given order.

If ShowGroups is true, the rows will be grouped by the given column. If AlwaysGroupsByColumn is not null, the rows will be grouped by that column, and the rows within each group will be sorted by the given column.

Sort ( int columnToSortIndex ) : void

Sort the items in the list view by the values in the given column and the last sort order

Sort ( string columnToSortName ) : void

Sort the items in the list view by the values in the given column and the last sort order

StartCellEdit ( OLVListItem item, int subItemIndex ) : void

Really start an edit operation on a given cell. The parameters are assumed to be sane.

ToggleCheckObject ( object modelObject ) : void

Toggle the checkedness of the given object. A checked object becomes unchecked; an unchecked or indeterminate object becomes checked. If the list has tristate checkboxes, the order is: unchecked -> checked -> indeterminate -> unchecked ...

ToggleSubItemCheckBox ( object rowObject, OLVColumn column ) : void

Toggle the check at the check box of the given cell

UncheckObject ( object modelObject ) : void

Mark the given object as unchecked in the list

UncheckObjects ( IEnumerable modelObjects ) : void

Mark the given objects as unchecked in the list

UncheckSubItem ( object rowObject, OLVColumn column ) : void

Uncheck the check at the given cell

Unfreeze ( ) : void

Unfreeze the listview. If this call is the outermost Unfreeze(), the contents of the listview will be rebuilt.

Freeze()/Unfreeze() calls nest correctly

Unsort ( ) : void

Remove any sorting and revert to the given order of the model objects

UpdateColumnFiltering ( ) : void

Update the filtering of this ObjectListView based on the value filtering defined in each column

보호된 메소드들

메소드 설명
AddItemsToColumnSelectMenu ( ToolStripItemCollection items ) : void

Create the menu items that will allow columns to be choosen and add them to the given collection

ApplyCellStyle ( BrightIdeasSoftware.OLVListItem olvi, int columnIndex, IItemStyle style ) : void

Apply a style to a cell

ApplyExtendedStyles ( ) : void

Apply all required extended styles to our control.

Whenever .NET code sets an extended style, it erases all other extended styles that it doesn't use. So, we have to explicit reapply the styles that we have added.

Normally, we would override CreateParms property and update the ExStyle member, but ListView seems to ignore all ExStyles that it doesn't already know about. Worse, when we set the LVS_EX_HEADERINALLVIEWS value, bad things happen (the control crashes!).

ApplyRowStyle ( BrightIdeasSoftware.OLVListItem olvi, IItemStyle style ) : void

Apply a style to the given row

CalculateCellEditorBoundsOwnerDrawn ( BrightIdeasSoftware.OLVListItem item, int subItemIndex, Rectangle r, Size preferredSize ) : Rectangle

Calculate the bounds of the edit control for the given item/column, when the listview is being owner drawn.

CalculateCellEditorBoundsStandard ( BrightIdeasSoftware.OLVListItem item, int subItemIndex, Rectangle cellBounds, Size preferredSize ) : Rectangle

Calculate the bounds of the edit control for the given item/column, when the listview is not being owner drawn.

CalculateOwnerDrawnHitTest ( BrightIdeasSoftware.OlvListViewHitTestInfo hti, int x, int y ) : void

Perform a hit test when the control is owner drawn. This hands off responsibility to the renderer.

CalculateStandardHitTest ( BrightIdeasSoftware.OlvListViewHitTestInfo hti, int x, int y ) : void

Perform a hit test when the control is not owner drawn

CellEditor_Validating ( object sender, CancelEventArgs e ) : void

Called when the cell editor could be about to lose focus. Time to commit the change

CleanupCellEdit ( bool expectingCellEdit ) : void

Remove all trace of any existing cell edit operation

ClearPersistentCheckState ( ) : void

Forget any persistent checkbox state

CollectGroupingParameters ( OLVColumn groupByColumn, SortOrder groupByOrder, OLVColumn column, SortOrder order, OLVColumn secondaryColumn, SortOrder secondaryOrder ) : BrightIdeasSoftware.GroupingParameters

Collect and return all the variables that influence the creation of groups

ConfigureControl ( ) : void

Setup the given control to be a cell editor

CorrectSubItemColors ( ListViewItem olvi ) : void

For some reason, UseItemStyleForSubItems doesn't work for the colors when owner drawing the list, so we have to specifically give each subitem the desired colors

Cells drawn via BaseRenderer don't need this, but it is needed when an owner drawn cell uses DrawDefault=true

CreateCellToolTip ( ) : void

Create a ToolTipControl to manage the tooltip control used by the listview control

CreateGroups ( IEnumerable groups ) : void

Do the actual work of creating the given list of groups

Dispose ( bool disposing ) : void

Dispose of any resources this instance has been using

DoUnfreeze ( ) : void

Do the actual work required when the listview is unfrozen

DrawAllDecorations ( Graphics g, List drawnItems ) : void

Draw all the decorations

FillInValues ( OLVListItem lvi, object rowObject ) : void

Fill in the given OLVListItem with values of the given row

FilterObjects ( IEnumerable originalObjects, IModelFilter aModelFilter, IListFilter aListFilter ) : IEnumerable

Do the actual work of filtering

FindMatchInRange ( string text, int first, int last, OLVColumn column ) : int

Find the first row in the given range of rows that prefix matches the string value of the given column.

ForceSubItemImagesExStyle ( ) : void

Make sure the ListView has the extended style that says to display subitem images.

This method must be called after any .NET call that update the extended styles since they seem to erase this setting.

GetActualImageIndex ( Object imageSelector ) : int

Convert the given image selector to an index into our image list. Return -1 if that's not possible

GetCellEditor ( OLVListItem item, int subItemIndex ) : Control

Return a control that can be used to edit the value of the given cell.

GetCheckState ( Object modelObject ) : CheckState?

Get the checkedness of an object from the model. Returning null means the model does not know and the value from the control will be used.

GetControlValue ( Control control ) : Object

Return the value that the given control is showing

GetPersistentCheckState ( object model ) : CheckState

Gets the checkedness of the given model.

HandleApplicationIdle ( object sender, EventArgs e ) : void

The application is idle. Trigger a SelectionChanged event.

HandleApplicationIdleResizeColumns ( object sender, EventArgs e ) : void

The application is idle. Trigger a SelectionChanged event.

HandleBeginScroll ( Message &m ) : bool

Handle the BeginScroll listview notification

HandleCellToolTipShowing ( object sender, ToolTipShowingEventArgs e ) : void

The cell tooltip control wants information about the tool tip that it should show.

HandleChar ( Message &m ) : bool

Handle the search for item m if possible.

HandleColumnClick ( object sender, ColumnClickEventArgs e ) : void

Event handler for the column click event

HandleColumnWidthChanged ( object sender, ColumnWidthChangedEventArgs e ) : void

When the column widths change, resize the space filling columns

HandleColumnWidthChanging ( object sender, ColumnWidthChangingEventArgs e ) : void

When the column widths are changing, resize the space filling columns

HandleContextMenu ( Message &m ) : bool

The user wants to see the context menu.

We want to ignore context menu requests that are triggered by right clicks on the header

HandleCustomDraw ( Message &m ) : bool

Handle the Custom draw series of notifications

HandleDestroy ( Message &m ) : bool

Handle the underlying control being destroyed

HandleEndScroll ( Message &m ) : bool

Handle the EndScroll listview notification

HandleFindItem ( Message &m ) : bool

Handle the search for item m if possible.

HandleGroupInfo ( Message &m ) : bool

Handle the Group Info series of notifications

HandleHeaderRightClick ( int columnIndex ) : bool

The user has right clicked on the column headers. Do whatever is required

HandleHeaderToolTipShowing ( object sender, ToolTipShowingEventArgs e ) : void

The header tooltip control wants information about the tool tip that it should show.

HandleKeyDown ( Message &m ) : bool

Handle a key down message

HandleLButtonDoubleClick ( Message &m ) : bool

Catch the Left Button double click event.

HandleLButtonDown ( Message &m ) : bool

Catch the Left Button down event.

HandleLButtonUp ( Message &m ) : bool

Catch the Left Button up event.

HandleLayout ( object sender, LayoutEventArgs e ) : void

When the size of the control changes, we have to resize our space filling columns.

HandleLinkClick ( Message &m ) : bool

Handle the LinkClick listview notification

HandleMouseMove ( Message &m ) : bool

Catch the MouseMove event.

HandleNotify ( Message &m ) : bool

In the notification messages, we handle attempts to change the width of our columns

HandlePaint ( Message &m ) : bool

Handle the WM_PAINT event

HandlePostPaint ( ) : void

Perform any steps needed after painting the control

HandlePrePaint ( ) : void

Perform any steps needed before painting the control

HandleRButtonDoubleClick ( Message &m ) : bool

Catch the right Button double click event.

HandleRButtonDown ( Message &m ) : bool

Catch the Right Button down event.

HandleReflectNotify ( Message &m ) : bool

Handle notifications that have been reflected back from the parent window

HandleWindowPosChanging ( Message &m ) : bool

Handle the window position changing.

InitializeCheckBoxImages ( ) : void

Make sure the small image list for this control has checkbox images (used for sub-item checkboxes).

This gives the ListView a small image list, if it doesn't already have one.

InitializeEmptyListMsgOverlay ( ) : void

Create and configure the empty list msg overlay

InitializeStandardOverlays ( ) : void

Initialize the standard image and text overlays

InitializeStateImageList ( ) : void

Initialize the state image list with the required checkbox images

LowLevelHitTest ( int x, int y ) : OlvListViewHitTestInfo

Perform a hit test using the Windows control's SUBITEMHITTEST message. This provides information about group hits that the standard ListView.HitTest() does not.

MakeDefaultCellEditor ( OLVColumn column ) : Control

Return a TextBox that can be used as a default cell editor.

MakeGroups ( GroupingParameters parms ) : IList

Make a list of groups that should be shown according to the given parameters

This should not change the state of the control. It is possible that the groups created will not be used. They may simply be discarded.

MakeHeaderRightClickMenu ( int columnIndex ) : ToolStripDropDown

Create the menu that should be displayed when the user right clicks on the given column header.

MakeSortIndicatorImages ( ) : void

If the sort indicator images don't already exist, this method will make and install them

OnColumnReordered ( ColumnReorderedEventArgs e ) : void

Override the OnColumnReordered method to do what we want

OnControlCreated ( ) : void

This method is called after the control has been fully created.

OnDragDrop ( DragEventArgs args ) : void

OnDragEnter ( DragEventArgs args ) : void

OnDragLeave ( EventArgs e ) : void

OnDragOver ( DragEventArgs args ) : void

OnDrawColumnHeader ( DrawListViewColumnHeaderEventArgs e ) : void

Owner draw the column header

OnDrawItem ( DrawListViewItemEventArgs e ) : void

Owner draw the item

OnDrawSubItem ( DrawListViewSubItemEventArgs e ) : void

Owner draw a single subitem

OnGiveFeedback ( GiveFeedbackEventArgs args ) : void

OnHandleCreated ( EventArgs e ) : void

Called when the handle of the underlying control is created

OnItemDrag ( ItemDragEventArgs e ) : void

OnMouseDown ( MouseEventArgs e ) : void

We need the click count in the mouse up event, but that is always 1. So we have to remember the click count from the preceding mouse down event.

OnMouseLeave ( EventArgs e ) : void

When the mouse leaves the control, remove any hot item highlighting

OnMouseMove ( MouseEventArgs e ) : void

When the mouse moves, we might need to change the hot item.

OnMouseUp ( MouseEventArgs e ) : void

Check to see if we need to start editing a cell

OnQueryContinueDrag ( QueryContinueDragEventArgs args ) : void

OnRightMouseUp ( MouseEventArgs e ) : void

The user right clicked on the control

OnSelectedIndexChanged ( EventArgs e ) : void

This method is called every time a row is selected or deselected. This can be a pain if the user shift-clicks 100 rows. We override this method so we can trigger one event for any number of select/deselects that come from one user action

PostProcessOneRow ( int rowIndex, int displayIndex, OLVListItem olvi ) : void

Do the work required after one item in a listview have been created

PostProcessRows ( ) : void

Do the work required after the items in a listview have been created

ProcessDialogKey ( Keys keyData ) : bool

Handle a key press on this control. We specifically look for F2 which edits the primary column, or a Tab character during an edit operation, which tries to start editing on the next (or previous) cell.

ProcessHyperlinkClicked ( CellClickEventArgs e ) : void

Tell the world that a hyperlink was clicked and if the event isn't handled, do the default processing.

ProcessLButtonDoubleClick ( OlvListViewHitTestInfo hti ) : bool

Handle a mouse double click at the given hit test location

Subclasses can override this to do something unique

ProcessLButtonDown ( OlvListViewHitTestInfo hti ) : bool

Handle a left mouse down at the given hit test location

Subclasses can override this to do something unique

ProcessRButtonDoubleClick ( OlvListViewHitTestInfo hti ) : bool

Handle a right mouse double click at the given hit test location

Subclasses can override this to do something unique

ProcessRButtonDown ( OlvListViewHitTestInfo hti ) : bool

Handle a left mouse down at the given hit test location

Subclasses can override this to do something unique

PutCheckState ( Object modelObject, CheckState state ) : CheckState

Record the change of checkstate for the given object in the model. This does not update the UI -- only the model

ResizeFreeSpaceFillingColumns ( ) : void

Resize our space filling columns so they fill any unoccupied width in the control

ResizeFreeSpaceFillingColumns ( int freeSpace ) : void

Resize our space filling columns so they fill any unoccupied width in the control

SetControlValue ( Control control, Object value, String stringValue ) : void

Try to give the given value to the provided control. Fall back to assigning a string if the value assignment fails.

SetObjectCheckedness ( object modelObject, CheckState state ) : void

Change the check state of the given object to be the given state.

If the given model object isn't in the list, we still try to remember its state, in case it is referenced in the future.

SetPersistentCheckState ( object model, CheckState state ) : CheckState

Remember the check state of the given model object

SetSubItemImages ( int rowIndex, OLVListItem item ) : void

Tell the underlying list control which images to show against the subitems

SetSubItemImages ( int rowIndex, OLVListItem item, bool shouldClearImages ) : void

Tell the underlying list control which images to show against the subitems

ShouldStartCellEdit ( MouseEventArgs e ) : bool

Should we start editing the cell in response to the given mouse button event?

ShowHeaderRightClickMenu ( int columnIndex, Point pt ) : bool

Show a menu that is appropriate when the given column header is clicked.

ShowSortIndicator ( OLVColumn columnToSort, SortOrder sortOrder ) : void

Put a sort indicator next to the text of the given given column

StandardHyperlinkClickedProcessing ( HyperlinkClickedEventArgs args ) : void

Do the default processing for a hyperlink clicked event, which is to try and open the url.

TakeOwnershipOfObjects ( ) : void

Take ownership of the 'objects' collection. This separats our collection from the source.

This method separates the 'objects' instance variable from its source, so that any AddObject/RemoveObject calls will modify our collection and not the original colleciton.

This method has the intentional side-effect of converting our list of objects to an ArrayList.

TriggerFormatRowEvent ( int rowIndex, int displayIndex, OLVListItem olvi ) : void

Trigger FormatRow and possibly FormatCell events for the given item

TriggerGroupExpandCollapse ( OLVGroup group ) : bool

Trigger a GroupExpandCollapse event and return true if the action was cancelled

UnapplyHotItem ( int index ) : void

Remove hot item styling from the given row

UpdateCellToolTipHandle ( ) : void

Update the handle used by our cell tooltip to be the tooltip used by the underlying Windows listview control.

UpdateFiltering ( ) : void

When some setting related to filtering changes, this method is called.

UpdateHotItem ( OlvListViewHitTestInfo hti ) : void

The mouse has moved to the given pt. See if the hot item needs to be updated

This is the main entry point for hot item handling

UpdateHotItem ( Point pt ) : void

The mouse has moved to the given pt. See if the hot item needs to be updated

This is the main entry point for hot item handling

UpdateHotRow ( OLVListItem olvi ) : void

Update the given row using the current hot item information

UpdateHotRow ( int rowIndex, int columnIndex, HitTestLocation hitLocation, OLVListItem olvi ) : void

Update the given row using the given hot item information

UpdateNotificationSubscriptions ( IEnumerable collection ) : void

Change any subscriptions to INotifyPropertyChanged events on our current model objects so that we no longer listen for events on the old models and do listen for events on the given collection.

This does nothing if UseNotifyPropertyChanged is false.

WndProc ( Message &m ) : void

Override the basic message pump for this control

비공개 메소드들

메소드 설명
AddCheckStateBitmap ( ImageList il, string key, CheckBoxState boxState ) : void
ApplyHyperlinkStyle ( int rowIndex, BrightIdeasSoftware.OLVListItem olvi ) : void
BuildBeforeSortingEventArgs ( OLVColumn column, SortOrder order ) : BrightIdeasSoftware.BeforeSortingEventArgs
BuildCellEvent ( BrightIdeasSoftware.CellEventArgs args, Point location ) : void
CalculateCellBounds ( BrightIdeasSoftware.OLVListItem item, int subItemIndex, ItemBoundsPortion portion ) : Rectangle
CalculateCheckState ( int state ) : CheckState
CalculateToggledCheckState ( OLVColumn column, CheckState currentState ) : CheckState
ColumnSelectMenuClosing ( object sender, System.Windows.Forms.ToolStripDropDownClosingEventArgs e ) : void
ColumnSelectMenuItemClicked ( object sender, ToolStripItemClickedEventArgs e ) : void
DoSort ( OLVColumn columnToSort, SortOrder order ) : void
FindGlassPanelForOverlay ( IOverlay overlay ) : GlassPanelForm
GetCheckedObject ( ) : object
GetCheckedObjects ( ) : ArrayList
GetFirstNonNullValue ( OLVColumn column ) : object

Get the first non-null value of the given column. At most 1000 rows will be considered.

GetSelectedObject ( ) : object
GetSelectedObjects ( ) : ArrayList
HandleHeaderRightClick ( ) : bool
HandleModelOnPropertyChanged ( object sender, PropertyChangedEventArgs propertyChangedEventArgs ) : void
HeaderToolTipShowingCallback ( object sender, ToolTipShowingEventArgs e ) : void

Allow the HeaderControl to call back into HandleHeaderToolTipShowing without making that method public

LowLevelScroll ( int dx, int dy ) : void

Scroll the ListView by the given deltas.

MakeResizedImage ( int width, int height, Image image, Color transparent ) : Bitmap

Return a bitmap of the given height x height, which shows the given image, centred.

MakeResizedImageList ( int width, int height, ImageList source ) : ImageList

Return a copy of the given source image list, where each image has been resized to be height x height in size. If source is null, an empty image list of the given size is returned

MakeSubItem ( object rowObject, OLVColumn column ) : OLVListSubItem
MakeTriangleBitmap ( Size sz, Point pts ) : Bitmap
PrepareAlternateBackColors ( ) : void
RememberDisplayIndicies ( ) : void
RunWhenIdle ( EventHandler eventHandler ) : void
SetAllSubItemImages ( ) : void
SetGroupSpacing ( ) : void
SetupBaseImageList ( ) : void

Update our externally visible image list so it holds the same images as our shadow list, but sized correctly

ShouldShowOverlays ( ) : bool
ShowColumnCommandMenu ( int columnIndex, Point pt ) : void
ShowColumnSelectMenu ( Point pt ) : void
StateToString ( uint state ) : string
SubscribeNotifications ( IEnumerable models ) : void
ToggleSelectedRowCheckBoxes ( ) : void
UnsubscribeNotifications ( IEnumerable models ) : void

메소드 상세

AddDecoration() 공개 메소드

Add the given decoration to those on this list and make it appear
A decoration scrolls with the listview. An overlay stays fixed in place.
public AddDecoration ( IDecoration decoration ) : void
decoration IDecoration The decoration
리턴 void

AddItemsToColumnSelectMenu() 보호된 메소드

Create the menu items that will allow columns to be choosen and add them to the given collection
protected AddItemsToColumnSelectMenu ( ToolStripItemCollection items ) : void
items System.Windows.Forms.ToolStripItemCollection
리턴 void

AddObject() 공개 메소드

Add the given model object to this control.
See AddObjects() for more details
public AddObject ( object modelObject ) : void
modelObject object The model object to be displayed
리턴 void

AddObjects() 공개 메소드

Add the given collection of model objects to this control.

The added objects will appear in their correct sort position, if sorting is active (i.e. if LastSortColumn is not null). Otherwise, they will appear at the end of the list.

No check is performed to see if any of the objects are already in the ListView.

Null objects are silently ignored.

public AddObjects ( ICollection modelObjects ) : void
modelObjects ICollection A collection of model objects
리턴 void

AddOverlay() 공개 메소드

Add the given overlay to those on this list and make it appear
public AddOverlay ( IOverlay overlay ) : void
overlay IOverlay The overlay
리턴 void

ApplyCellStyle() 보호된 메소드

Apply a style to a cell
protected ApplyCellStyle ( BrightIdeasSoftware.OLVListItem olvi, int columnIndex, IItemStyle style ) : void
olvi BrightIdeasSoftware.OLVListItem
columnIndex int
style IItemStyle
리턴 void

ApplyExtendedStyles() 보호된 메소드

Apply all required extended styles to our control.

Whenever .NET code sets an extended style, it erases all other extended styles that it doesn't use. So, we have to explicit reapply the styles that we have added.

Normally, we would override CreateParms property and update the ExStyle member, but ListView seems to ignore all ExStyles that it doesn't already know about. Worse, when we set the LVS_EX_HEADERINALLVIEWS value, bad things happen (the control crashes!).

protected ApplyExtendedStyles ( ) : void
리턴 void

ApplyRowStyle() 보호된 메소드

Apply a style to the given row
protected ApplyRowStyle ( BrightIdeasSoftware.OLVListItem olvi, IItemStyle style ) : void
olvi BrightIdeasSoftware.OLVListItem
style IItemStyle
리턴 void

AutoResizeColumns() 공개 메소드

Resize the columns to the maximum of the header width and the data.
public AutoResizeColumns ( ) : void
리턴 void

BuildGroups() 공개 메소드

Organise the view items into groups, based on the last sort column or the first column if there is no last sort column
public BuildGroups ( ) : void
리턴 void

BuildGroups() 공개 메소드

Organise the view items into groups, based on the given column

If the AlwaysGroupByColumn property is not null, the list view items will be organisd by that column, and the 'column' parameter will be ignored.

This method triggers sorting events: BeforeSorting and AfterSorting.

public BuildGroups ( OLVColumn column, SortOrder order ) : void
column OLVColumn The column whose values should be used for sorting.
order SortOrder
리턴 void

BuildGroups() 공개 메소드

Organise the view items into groups, based on the given columns
This method does not trigger sorting events. Use BuildGroups() to do that
public BuildGroups ( OLVColumn groupByColumn, SortOrder groupByOrder, OLVColumn column, SortOrder order, OLVColumn secondaryColumn, SortOrder secondaryOrder ) : void
groupByColumn OLVColumn What column will be used for grouping
groupByOrder SortOrder What ordering will be used for groups
column OLVColumn The column whose values should be used for sorting. Cannot be null
order SortOrder The order in which the values from column will be sorted
secondaryColumn OLVColumn When the values from 'column' are equal, use the values provided by this column
secondaryOrder SortOrder How will the secondary values be sorted
리턴 void

BuildList() 공개 메소드

Build/rebuild all the list view items in the list, preserving as much state as is possible
public BuildList ( ) : void
리턴 void

BuildList() 공개 메소드

Build/rebuild all the list view items in the list

Use this method in situations were the contents of the list is basically the same as previously.

public BuildList ( bool shouldPreserveState ) : void
shouldPreserveState bool If this is true, the control will try to preserve the selection, /// focused item, and the scroll position (see Remarks) ///
리턴 void

CalculateCellBounds() 공개 메소드

Return the bounds of the given cell
public CalculateCellBounds ( BrightIdeasSoftware.OLVListItem item, int subItemIndex ) : Rectangle
item BrightIdeasSoftware.OLVListItem The row to be edited
subItemIndex int The index of the cell to be edited
리턴 System.Drawing.Rectangle

CalculateCellEditorBounds() 공개 메소드

Calculate the bounds of the edit control for the given item/column
public CalculateCellEditorBounds ( BrightIdeasSoftware.OLVListItem item, int subItemIndex, Size preferredSize ) : Rectangle
item BrightIdeasSoftware.OLVListItem
subItemIndex int
preferredSize System.Drawing.Size
리턴 System.Drawing.Rectangle

CalculateCellEditorBoundsOwnerDrawn() 보호된 메소드

Calculate the bounds of the edit control for the given item/column, when the listview is being owner drawn.
protected CalculateCellEditorBoundsOwnerDrawn ( BrightIdeasSoftware.OLVListItem item, int subItemIndex, Rectangle r, Size preferredSize ) : Rectangle
item BrightIdeasSoftware.OLVListItem
subItemIndex int
r System.Drawing.Rectangle
preferredSize System.Drawing.Size
리턴 System.Drawing.Rectangle

CalculateCellEditorBoundsStandard() 보호된 메소드

Calculate the bounds of the edit control for the given item/column, when the listview is not being owner drawn.
protected CalculateCellEditorBoundsStandard ( BrightIdeasSoftware.OLVListItem item, int subItemIndex, Rectangle cellBounds, Size preferredSize ) : Rectangle
item BrightIdeasSoftware.OLVListItem
subItemIndex int
cellBounds System.Drawing.Rectangle
preferredSize System.Drawing.Size
리턴 System.Drawing.Rectangle

CalculateCellTextBounds() 공개 메소드

Return the bounds of the given cell only until the edge of the current text
public CalculateCellTextBounds ( BrightIdeasSoftware.OLVListItem item, int subItemIndex ) : Rectangle
item BrightIdeasSoftware.OLVListItem The row to be edited
subItemIndex int The index of the cell to be edited
리턴 System.Drawing.Rectangle

CalculateOwnerDrawnHitTest() 보호된 메소드

Perform a hit test when the control is owner drawn. This hands off responsibility to the renderer.
protected CalculateOwnerDrawnHitTest ( BrightIdeasSoftware.OlvListViewHitTestInfo hti, int x, int y ) : void
hti BrightIdeasSoftware.OlvListViewHitTestInfo
x int
y int
리턴 void

CalculateReasonableTileSize() 공개 메소드

Give the listview a reasonable size of its tiles, based on the number of lines of information that each tile is going to display.
public CalculateReasonableTileSize ( ) : void
리턴 void

CalculateStandardHitTest() 보호된 메소드

Perform a hit test when the control is not owner drawn
protected CalculateStandardHitTest ( BrightIdeasSoftware.OlvListViewHitTestInfo hti, int x, int y ) : void
hti BrightIdeasSoftware.OlvListViewHitTestInfo
x int
y int
리턴 void

CancelCellEdit() 공개 메소드

Stop editing a cell and throw away any changes.
public CancelCellEdit ( ) : void
리턴 void

CellEditor_Validating() 보호된 메소드

Called when the cell editor could be about to lose focus. Time to commit the change
protected CellEditor_Validating ( object sender, CancelEventArgs e ) : void
sender object
e CancelEventArgs
리턴 void

ChangeToFilteredColumns() 공개 메소드

Rebuild this list for the given view
public ChangeToFilteredColumns ( View view ) : void
view View
리턴 void

CheckIndeterminateObject() 공개 메소드

Mark the given object as indeterminate check state
public CheckIndeterminateObject ( object modelObject ) : void
modelObject object The model object to be marked indeterminate
리턴 void

CheckIndeterminateSubItem() 공개 메소드

Put an indeterminate check into the check box at the given cell
public CheckIndeterminateSubItem ( object rowObject, OLVColumn column ) : void
rowObject object
column OLVColumn
리턴 void

CheckObject() 공개 메소드

Mark the given object as checked in the list
public CheckObject ( object modelObject ) : void
modelObject object The model object to be checked
리턴 void

CheckObjects() 공개 메소드

Mark the given objects as checked in the list
public CheckObjects ( IEnumerable modelObjects ) : void
modelObjects IEnumerable The model object to be checked
리턴 void

CheckSubItem() 공개 메소드

Put a check into the check box at the given cell
public CheckSubItem ( object rowObject, OLVColumn column ) : void
rowObject object
column OLVColumn
리턴 void

CleanupCellEdit() 보호된 메소드

Remove all trace of any existing cell edit operation
protected CleanupCellEdit ( bool expectingCellEdit ) : void
expectingCellEdit bool
리턴 void

ClearHotItem() 공개 메소드

Force the hot item to be recalculated
public ClearHotItem ( ) : void
리턴 void

ClearObjects() 공개 메소드

Remove all items from this list
public ClearObjects ( ) : void
리턴 void

ClearPersistentCheckState() 보호된 메소드

Forget any persistent checkbox state
protected ClearPersistentCheckState ( ) : void
리턴 void

ClearUrlVisited() 공개 메소드

Reset the memory of which URLs have been visited
public ClearUrlVisited ( ) : void
리턴 void

CollectGroupingParameters() 보호된 메소드

Collect and return all the variables that influence the creation of groups
protected CollectGroupingParameters ( OLVColumn groupByColumn, SortOrder groupByOrder, OLVColumn column, SortOrder order, OLVColumn secondaryColumn, SortOrder secondaryOrder ) : BrightIdeasSoftware.GroupingParameters
groupByColumn OLVColumn
groupByOrder SortOrder
column OLVColumn
order SortOrder
secondaryColumn OLVColumn
secondaryOrder SortOrder
리턴 BrightIdeasSoftware.GroupingParameters

ConfigureAutoComplete() 공개 메소드

Configure the given text box to autocomplete unique values from the given column. At most 1000 rows will be considered.
public ConfigureAutoComplete ( TextBox tb, OLVColumn column ) : void
tb System.Windows.Forms.TextBox The textbox to configure
column OLVColumn The column used to calculate values
리턴 void

ConfigureAutoComplete() 공개 메소드

Configure the given text box to autocomplete unique values from the given column. At most 1000 rows will be considered.
public ConfigureAutoComplete ( TextBox tb, OLVColumn column, int maxRows ) : void
tb System.Windows.Forms.TextBox The textbox to configure
column OLVColumn The column used to calculate values
maxRows int Consider only this many rows
리턴 void

ConfigureControl() 보호된 메소드

Setup the given control to be a cell editor
protected ConfigureControl ( ) : void
리턴 void

CopyObjectsToClipboard() 공개 메소드

Copy a text and html representation of the given objects onto the clipboard.
public CopyObjectsToClipboard ( IList objectsToCopy ) : void
objectsToCopy IList
리턴 void

CopySelectionToClipboard() 공개 메소드

Copy a text and html representation of the selected rows onto the clipboard.
Be careful when using this with virtual lists. If the user has selected 10,000,000 rows, this method will faithfully try to copy all of them to the clipboard. From the user's point of view, your program will appear to have hung.
public CopySelectionToClipboard ( ) : void
리턴 void

CorrectSubItemColors() 보호된 메소드

For some reason, UseItemStyleForSubItems doesn't work for the colors when owner drawing the list, so we have to specifically give each subitem the desired colors
Cells drawn via BaseRenderer don't need this, but it is needed when an owner drawn cell uses DrawDefault=true
protected CorrectSubItemColors ( ListViewItem olvi ) : void
olvi ListViewItem The item whose subitems are to be corrected
리턴 void

CreateCellToolTip() 보호된 메소드

Create a ToolTipControl to manage the tooltip control used by the listview control
protected CreateCellToolTip ( ) : void
리턴 void

CreateColumnFilter() 공개 메소드

Create a filter that will enact all the filtering currently installed on the visible columns.
public CreateColumnFilter ( ) : IModelFilter
리턴 IModelFilter

CreateGroups() 보호된 메소드

Do the actual work of creating the given list of groups
protected CreateGroups ( IEnumerable groups ) : void
groups IEnumerable
리턴 void

DeselectAll() 공개 메소드

Deselect all rows in the listview
public DeselectAll ( ) : void
리턴 void

Dispose() 보호된 메소드

Dispose of any resources this instance has been using
protected Dispose ( bool disposing ) : void
disposing bool
리턴 void

DoUnfreeze() 보호된 메소드

Do the actual work required when the listview is unfrozen
protected DoUnfreeze ( ) : void
리턴 void

DrawAllDecorations() 보호된 메소드

Draw all the decorations
protected DrawAllDecorations ( Graphics g, List drawnItems ) : void
g Graphics A Graphics
drawnItems List The items that were redrawn and whose decorations should also be redrawn
리턴 void

DropSinkCanDrop() 공개 메소드

public DropSinkCanDrop ( object sender, OlvDropEventArgs e ) : void
sender object
e OlvDropEventArgs
리턴 void

DropSinkDropped() 공개 메소드

public DropSinkDropped ( object sender, OlvDropEventArgs e ) : void
sender object
e OlvDropEventArgs
리턴 void

DropSinkModelCanDrop() 공개 메소드

public DropSinkModelCanDrop ( object sender, ModelDropEventArgs e ) : void
sender object
e ModelDropEventArgs
리턴 void

DropSinkModelDropped() 공개 메소드

public DropSinkModelDropped ( object sender, ModelDropEventArgs e ) : void
sender object
e ModelDropEventArgs
리턴 void

EditSubItem() 공개 메소드

Begin an edit operation on the given cell.
This performs various sanity checks and passes off the real work to StartCellEdit().
public EditSubItem ( OLVListItem item, int subItemIndex ) : void
item OLVListItem The row to be edited
subItemIndex int The index of the cell to be edited
리턴 void

EnableCustomSelectionColors() 공개 메소드

Setup the list so it will draw selected rows using custom colours.
This method makes the list owner drawn, and ensures that all columns have at least a BaseRender installed.
public EnableCustomSelectionColors ( ) : void
리턴 void

EnsureGroupVisible() 공개 메소드

Scroll the listview so that the given group is at the top.

If the group is already visible, the list will still be scrolled to move the group to the top, if that is possible.

This only works when the list is showing groups (obviously).

This does not work on virtual lists, since virtual lists don't use ListViewGroups for grouping. Use VirtualObjectListView.EnsureNthGroupVisible instead.

public EnsureGroupVisible ( ListViewGroup lvg ) : void
lvg ListViewGroup The group to be revealed
리턴 void

EnsureModelVisible() 공개 메소드

Ensure that the given model object is visible
public EnsureModelVisible ( Object modelObject ) : void
modelObject Object The model object to be revealed
리턴 void

EnumerableToArray() 공개 정적인 메소드

Convert the given enumerable into an ArrayList as efficiently as possible

When we move to .NET 3.5, we can use LINQ and not need this method.

public static EnumerableToArray ( IEnumerable collection, bool alwaysCreate ) : ArrayList
collection IEnumerable The source collection
alwaysCreate bool If true, this method will always create a new /// collection.
리턴 ArrayList

FillInValues() 보호된 메소드

Fill in the given OLVListItem with values of the given row
protected FillInValues ( OLVListItem lvi, object rowObject ) : void
lvi OLVListItem the OLVListItem that is to be stuff with values
rowObject object the model object from which values will be taken
리턴 void

FilterObjects() 보호된 메소드

Do the actual work of filtering
protected FilterObjects ( IEnumerable originalObjects, IModelFilter aModelFilter, IListFilter aListFilter ) : IEnumerable
originalObjects IEnumerable
aModelFilter IModelFilter
aListFilter IListFilter
리턴 IEnumerable

FindMatchInRange() 보호된 메소드

Find the first row in the given range of rows that prefix matches the string value of the given column.
protected FindMatchInRange ( string text, int first, int last, OLVColumn column ) : int
text string
first int
last int
column OLVColumn
리턴 int

FindMatchingRow() 공개 메소드

Find the first row after the given start in which the text value in the comparison column begins with the given text. The comparison column is column 0, unless IsSearchOnSortColumn is true, in which case the current sort column is used.
The text comparison is a case-insensitive, prefix match. The search will search the every row until a match is found, wrapping at the end if needed.
public FindMatchingRow ( string text, int start, SearchDirectionHint direction ) : int
text string The text to be prefix matched
start int The index of the first row to consider
direction SearchDirectionHint Which direction should be searched?
리턴 int

FinishCellEdit() 공개 메소드

Finish the cell edit operation, writing changed data back to the model object
This method does not trigger a Validating event, so it always finishes the cell edit.
public FinishCellEdit ( ) : void
리턴 void

FinishCellEdit() 공개 메소드

Finish the cell edit operation, writing changed data back to the model object
This method does not trigger a Validating event, so it always finishes the cell edit.
public FinishCellEdit ( bool expectingCellEdit ) : void
expectingCellEdit bool True if it is likely that another cell is going to be /// edited immediately after this cell finishes editing
리턴 void

ForceSubItemImagesExStyle() 보호된 메소드

Make sure the ListView has the extended style that says to display subitem images.
This method must be called after any .NET call that update the extended styles since they seem to erase this setting.
protected ForceSubItemImagesExStyle ( ) : void
리턴 void

Freeze() 공개 메소드

Freeze the listview so that it no longer updates itself.
Freeze()/Unfreeze() calls nest correctly
public Freeze ( ) : void
리턴 void

GetActualImageIndex() 보호된 메소드

Convert the given image selector to an index into our image list. Return -1 if that's not possible
protected GetActualImageIndex ( Object imageSelector ) : int
imageSelector Object
리턴 int

GetCellEditor() 보호된 메소드

Return a control that can be used to edit the value of the given cell.
protected GetCellEditor ( OLVListItem item, int subItemIndex ) : Control
item OLVListItem The row to be edited
subItemIndex int The index of the cell to be edited
리턴 Control

GetCellToolTip() 공개 메소드

Return the tooltip that should be shown when the mouse is hovered over the given cell
public GetCellToolTip ( int columnIndex, int rowIndex ) : String
columnIndex int The column index whose tool tip is to be fetched
rowIndex int The row index whose tool tip is to be fetched
리턴 String

GetCheckState() 보호된 메소드

Get the checkedness of an object from the model. Returning null means the model does not know and the value from the control will be used.
protected GetCheckState ( Object modelObject ) : CheckState?
modelObject Object
리턴 CheckState?

GetColumn() 공개 메소드

Return the column at the given index
public GetColumn ( int index ) : OLVColumn
index int Index of the column to be returned
리턴 OLVColumn

GetColumn() 공개 메소드

Return the column at the given title.
public GetColumn ( string name ) : OLVColumn
name string Name of the column to be returned
리턴 OLVColumn

GetControlValue() 보호된 메소드

Return the value that the given control is showing
protected GetControlValue ( Control control ) : Object
control Control
리턴 Object

GetDisplayOrderOfItemIndex() 공개 메소드

Return the display index of the given listviewitem index. If the control is not grouped, the display order is the same as the sorted list order. But if the list is grouped, the display order is different.
public GetDisplayOrderOfItemIndex ( int itemIndex ) : int
itemIndex int
리턴 int

GetFilteredColumns() 공개 메소드

Return a collection of columns that are visible to the given view. Only Tile and Details have columns; all other views have 0 columns.
public GetFilteredColumns ( View view ) : List
view View Which view are the columns being calculate for?
리턴 List

GetHeaderToolTip() 공개 메소드

Return the tooltip that should be shown when the mouse is hovered over the given column
public GetHeaderToolTip ( int columnIndex ) : String
columnIndex int The column index whose tool tip is to be fetched
리턴 String

GetItem() 공개 메소드

Return the item at the given index
public GetItem ( int index ) : OLVListItem
index int Index of the item to be returned
리턴 OLVListItem

GetItemAt() 공개 메소드

Find the item and column that are under the given co-ords
public GetItemAt ( int x, int y, OLVColumn &hitColumn ) : OLVListItem
x int X co-ord
y int Y co-ord
hitColumn OLVColumn The column under the given point
리턴 OLVListItem

GetItemCount() 공개 메소드

Return the number of items in the list
public GetItemCount ( ) : int
리턴 int

GetLastItemInDisplayOrder() 공개 메소드

Return the last item in the order they are shown to the user. If the control is not grouped, the display order is the same as the sorted list order. But if the list is grouped, the display order is different.
public GetLastItemInDisplayOrder ( ) : OLVListItem
리턴 OLVListItem

GetModelObject() 공개 메소드

Return the model object at the given index
public GetModelObject ( int index ) : object
index int Index of the model object to be returned
리턴 object

GetNextItem() 공개 메소드

Return the ListViewItem that appears immediately after the given item. If the given item is null, the first item in the list will be returned. Return null if the given item is the last item.
public GetNextItem ( OLVListItem itemToFind ) : OLVListItem
itemToFind OLVListItem The item that is before the item that is returned, or null
리턴 OLVListItem

GetNthItemInDisplayOrder() 공개 메소드

Return the n'th item (0-based) in the order they are shown to the user. If the control is not grouped, the display order is the same as the sorted list order. But if the list is grouped, the display order is different.
public GetNthItemInDisplayOrder ( int n ) : OLVListItem
n int
리턴 OLVListItem

GetPersistentCheckState() 보호된 메소드

Gets the checkedness of the given model.
protected GetPersistentCheckState ( object model ) : CheckState
model object The model
리턴 CheckState

GetPreviousItem() 공개 메소드

Return the ListViewItem that appears immediately before the given item. If the given item is null, the last item in the list will be returned. Return null if the given item is the first item.
public GetPreviousItem ( OLVListItem itemToFind ) : OLVListItem
itemToFind OLVListItem The item that is before the item that is returned
리턴 OLVListItem

GetSubItem() 공개 메소드

Return the sub item at the given index/column
public GetSubItem ( int index, int columnIndex ) : OLVListSubItem
index int Index of the item to be returned
columnIndex int Index of the subitem to be returned
리턴 OLVListSubItem

HandleApplicationIdle() 보호된 메소드

The application is idle. Trigger a SelectionChanged event.
protected HandleApplicationIdle ( object sender, EventArgs e ) : void
sender object
e EventArgs
리턴 void

HandleApplicationIdleResizeColumns() 보호된 메소드

The application is idle. Trigger a SelectionChanged event.
protected HandleApplicationIdleResizeColumns ( object sender, EventArgs e ) : void
sender object
e EventArgs
리턴 void

HandleBeginScroll() 보호된 메소드

Handle the BeginScroll listview notification
protected HandleBeginScroll ( Message &m ) : bool
m Message
리턴 bool

HandleCellToolTipShowing() 보호된 메소드

The cell tooltip control wants information about the tool tip that it should show.
protected HandleCellToolTipShowing ( object sender, ToolTipShowingEventArgs e ) : void
sender object
e ToolTipShowingEventArgs
리턴 void

HandleChar() 보호된 메소드

Handle the search for item m if possible.
protected HandleChar ( Message &m ) : bool
m Message The m to be processed
리턴 bool

HandleColumnClick() 보호된 메소드

Event handler for the column click event
protected HandleColumnClick ( object sender, ColumnClickEventArgs e ) : void
sender object
e ColumnClickEventArgs
리턴 void

HandleColumnWidthChanged() 보호된 메소드

When the column widths change, resize the space filling columns
protected HandleColumnWidthChanged ( object sender, ColumnWidthChangedEventArgs e ) : void
sender object
e ColumnWidthChangedEventArgs
리턴 void

HandleColumnWidthChanging() 보호된 메소드

When the column widths are changing, resize the space filling columns
protected HandleColumnWidthChanging ( object sender, ColumnWidthChangingEventArgs e ) : void
sender object
e ColumnWidthChangingEventArgs
리턴 void

HandleContextMenu() 보호된 메소드

The user wants to see the context menu.
We want to ignore context menu requests that are triggered by right clicks on the header
protected HandleContextMenu ( Message &m ) : bool
m Message The windows m
리턴 bool

HandleCustomDraw() 보호된 메소드

Handle the Custom draw series of notifications
protected HandleCustomDraw ( Message &m ) : bool
m Message The message
리턴 bool

HandleDestroy() 보호된 메소드

Handle the underlying control being destroyed
protected HandleDestroy ( Message &m ) : bool
m Message
리턴 bool

HandleEndScroll() 보호된 메소드

Handle the EndScroll listview notification
protected HandleEndScroll ( Message &m ) : bool
m Message
리턴 bool

HandleFindItem() 보호된 메소드

Handle the search for item m if possible.
protected HandleFindItem ( Message &m ) : bool
m Message The m to be processed
리턴 bool

HandleGroupInfo() 보호된 메소드

Handle the Group Info series of notifications
protected HandleGroupInfo ( Message &m ) : bool
m Message The message
리턴 bool

HandleHeaderRightClick() 보호된 메소드

The user has right clicked on the column headers. Do whatever is required
protected HandleHeaderRightClick ( int columnIndex ) : bool
columnIndex int
리턴 bool

HandleHeaderToolTipShowing() 보호된 메소드

The header tooltip control wants information about the tool tip that it should show.
protected HandleHeaderToolTipShowing ( object sender, ToolTipShowingEventArgs e ) : void
sender object
e ToolTipShowingEventArgs
리턴 void

HandleKeyDown() 보호된 메소드

Handle a key down message
protected HandleKeyDown ( Message &m ) : bool
m Message
리턴 bool

HandleLButtonDoubleClick() 보호된 메소드

Catch the Left Button double click event.
protected HandleLButtonDoubleClick ( Message &m ) : bool
m Message The m to be processed
리턴 bool

HandleLButtonDown() 보호된 메소드

Catch the Left Button down event.
protected HandleLButtonDown ( Message &m ) : bool
m Message The m to be processed
리턴 bool

HandleLButtonUp() 보호된 메소드

Catch the Left Button up event.
protected HandleLButtonUp ( Message &m ) : bool
m Message The m to be processed
리턴 bool

HandleLayout() 보호된 메소드

When the size of the control changes, we have to resize our space filling columns.
protected HandleLayout ( object sender, LayoutEventArgs e ) : void
sender object
e LayoutEventArgs
리턴 void

HandleLinkClick() 보호된 메소드

Handle the LinkClick listview notification
protected HandleLinkClick ( Message &m ) : bool
m Message
리턴 bool

HandleMouseMove() 보호된 메소드

Catch the MouseMove event.
protected HandleMouseMove ( Message &m ) : bool
m Message The m to be processed
리턴 bool

HandleNotify() 보호된 메소드

In the notification messages, we handle attempts to change the width of our columns
protected HandleNotify ( Message &m ) : bool
m Message The m to be processed
리턴 bool

HandlePaint() 보호된 메소드

Handle the WM_PAINT event
protected HandlePaint ( Message &m ) : bool
m Message
리턴 bool

HandlePostPaint() 보호된 메소드

Perform any steps needed after painting the control
protected HandlePostPaint ( ) : void
리턴 void

HandlePrePaint() 보호된 메소드

Perform any steps needed before painting the control
protected HandlePrePaint ( ) : void
리턴 void

HandleRButtonDoubleClick() 보호된 메소드

Catch the right Button double click event.
protected HandleRButtonDoubleClick ( Message &m ) : bool
m Message The m to be processed
리턴 bool

HandleRButtonDown() 보호된 메소드

Catch the Right Button down event.
protected HandleRButtonDown ( Message &m ) : bool
m Message The m to be processed
리턴 bool

HandleReflectNotify() 보호된 메소드

Handle notifications that have been reflected back from the parent window
protected HandleReflectNotify ( Message &m ) : bool
m Message The m to be processed
리턴 bool

HandleWindowPosChanging() 보호된 메소드

Handle the window position changing.
protected HandleWindowPosChanging ( Message &m ) : bool
m Message The m to be processed
리턴 bool

HasDecoration() 공개 메소드

Is the given decoration shown on this list
public HasDecoration ( IDecoration decoration ) : bool
decoration IDecoration The overlay
리턴 bool

HasOverlay() 공개 메소드

Is the given overlay shown on this list?
public HasOverlay ( IOverlay overlay ) : bool
overlay IOverlay The overlay
리턴 bool

HideOverlays() 공개 메소드

Hide any overlays.
This is only a temporary hiding -- the overlays will be shown the next time the ObjectListView redraws.
public HideOverlays ( ) : void
리턴 void

HitTest() 공개 메소드

Calculate what item is under the given point?
public HitTest ( int x, int y ) : ListViewHitTestInfo
x int
y int
리턴 ListViewHitTestInfo

ISupportInitialize() 공개 메소드

public ISupportInitialize ( ) : void
리턴 void

IndexOf() 공개 메소드

Find the given model object within the listview and return its index
public IndexOf ( Object modelObject ) : int
modelObject Object The model object to be found
리턴 int

InitializeCheckBoxImages() 보호된 메소드

Make sure the small image list for this control has checkbox images (used for sub-item checkboxes).
This gives the ListView a small image list, if it doesn't already have one.
protected InitializeCheckBoxImages ( ) : void
리턴 void

InitializeEmptyListMsgOverlay() 보호된 메소드

Create and configure the empty list msg overlay
protected InitializeEmptyListMsgOverlay ( ) : void
리턴 void

InitializeStandardOverlays() 보호된 메소드

Initialize the standard image and text overlays
protected InitializeStandardOverlays ( ) : void
리턴 void

InitializeStateImageList() 보호된 메소드

Initialize the state image list with the required checkbox images
protected InitializeStateImageList ( ) : void
리턴 void

InsertObjects() 공개 메소드

Insert the given collection of objects before the given position

This operation only makes sense of non-sorted, non-grouped lists, since any subsequent sort/group operation will rearrange the list.

This method only works on ObjectListViews and FastObjectListViews.

public InsertObjects ( int index, ICollection modelObjects ) : void
index int Where to insert the objects
modelObjects ICollection The objects to be inserted
리턴 void

IsChecked() 공개 메소드

Return true of the given object is checked
If the given object is not in the list, this method returns false.
public IsChecked ( object modelObject ) : bool
modelObject object The model object whose checkedness is returned
리턴 bool

IsCheckedIndeterminate() 공개 메소드

Return true of the given object is indeterminately checked
If the given object is not in the list, this method returns false.
public IsCheckedIndeterminate ( object modelObject ) : bool
modelObject object The model object whose checkedness is returned
리턴 bool

IsEnumerableEmpty() 공개 정적인 메소드

public static IsEnumerableEmpty ( IEnumerable collection ) : bool
collection IEnumerable
리턴 bool

IsSelected() 공개 메소드

Return true if the row representing the given model is selected
public IsSelected ( object model ) : bool
model object The model object to look for
리턴 bool

IsSubItemChecked() 공개 메소드

Is there a check at the check box at the given cell
public IsSubItemChecked ( object rowObject, OLVColumn column ) : bool
rowObject object
column OLVColumn
리턴 bool

IsUrlVisited() 공개 메소드

Has the given URL been visited?
public IsUrlVisited ( string url ) : bool
url string The string to be consider
리턴 bool

LowLevelHitTest() 보호된 메소드

Perform a hit test using the Windows control's SUBITEMHITTEST message. This provides information about group hits that the standard ListView.HitTest() does not.
protected LowLevelHitTest ( int x, int y ) : OlvListViewHitTestInfo
x int
y int
리턴 OlvListViewHitTestInfo

MakeColumnCommandMenu() 공개 메소드

Append the column selection menu items to the given menu strip.
public MakeColumnCommandMenu ( ToolStripDropDown strip, int columnIndex ) : ToolStripDropDown
strip ToolStripDropDown The menu to which the items will be added.
columnIndex int
리턴 ToolStripDropDown

MakeColumnSelectMenu() 공개 메소드

Append the column selection menu items to the given menu strip.
public MakeColumnSelectMenu ( ToolStripDropDown strip ) : ToolStripDropDown
strip ToolStripDropDown The menu to which the items will be added.
리턴 ToolStripDropDown

MakeDefaultCellEditor() 보호된 메소드

Return a TextBox that can be used as a default cell editor.
protected MakeDefaultCellEditor ( OLVColumn column ) : Control
column OLVColumn What column does the cell belong to?
리턴 Control

MakeFilteringMenu() 공개 메소드

Create a Filtering menu
public MakeFilteringMenu ( ToolStripDropDown strip, int columnIndex ) : ToolStripDropDown
strip ToolStripDropDown
columnIndex int
리턴 ToolStripDropDown

MakeGroups() 보호된 메소드

Make a list of groups that should be shown according to the given parameters
This should not change the state of the control. It is possible that the groups created will not be used. They may simply be discarded.
protected MakeGroups ( GroupingParameters parms ) : IList
parms GroupingParameters
리턴 IList

MakeHeaderRightClickMenu() 보호된 메소드

Create the menu that should be displayed when the user right clicks on the given column header.
protected MakeHeaderRightClickMenu ( int columnIndex ) : ToolStripDropDown
columnIndex int Index of the column that was right clicked. /// This can be negative, which indicates a click outside of any header.
리턴 ToolStripDropDown

MakeSortIndicatorImages() 보호된 메소드

If the sort indicator images don't already exist, this method will make and install them
protected MakeSortIndicatorImages ( ) : void
리턴 void

MarkUrlVisited() 공개 메소드

Remember that the given URL has been visited
This does not cause the control be redrawn
public MarkUrlVisited ( string url ) : void
url string The url to be remembered
리턴 void

ModelToItem() 공개 메소드

Return the OLVListItem that displays the given model object
This method has O(n) performance.
public ModelToItem ( object modelObject ) : OLVListItem
modelObject object The modelObject whose item is to be found
리턴 OLVListItem

MoveObjects() 공개 메소드

Move the given collection of objects to the given index.
This operation only makes sense on non-grouped ObjectListViews.
public MoveObjects ( int index, ICollection modelObjects ) : void
index int
modelObjects ICollection
리턴 void

ObjectListView() 공개 메소드

Create an ObjectListView
public ObjectListView ( ) : System
리턴 System

ObjectsToHtml() 공개 메소드

Return a html representation of the given objects
public ObjectsToHtml ( IList objectsToConvert ) : string
objectsToConvert IList
리턴 string

OlvHitTest() 공개 메소드

What is under the given point? This takes the various parts of a cell into accout, including any custom parts that a custom renderer might use
public OlvHitTest ( int x, int y ) : OlvListViewHitTestInfo
x int
y int
리턴 OlvListViewHitTestInfo

OnColumnReordered() 보호된 메소드

Override the OnColumnReordered method to do what we want
protected OnColumnReordered ( ColumnReorderedEventArgs e ) : void
e ColumnReorderedEventArgs
리턴 void

OnControlCreated() 보호된 메소드

This method is called after the control has been fully created.
protected OnControlCreated ( ) : void
리턴 void

OnDragDrop() 보호된 메소드

protected OnDragDrop ( DragEventArgs args ) : void
args DragEventArgs
리턴 void

OnDragEnter() 보호된 메소드

protected OnDragEnter ( DragEventArgs args ) : void
args DragEventArgs
리턴 void

OnDragLeave() 보호된 메소드

protected OnDragLeave ( EventArgs e ) : void
e EventArgs
리턴 void

OnDragOver() 보호된 메소드

protected OnDragOver ( DragEventArgs args ) : void
args DragEventArgs
리턴 void

OnDrawColumnHeader() 보호된 메소드

Owner draw the column header
protected OnDrawColumnHeader ( DrawListViewColumnHeaderEventArgs e ) : void
e DrawListViewColumnHeaderEventArgs
리턴 void

OnDrawItem() 보호된 메소드

Owner draw the item
protected OnDrawItem ( DrawListViewItemEventArgs e ) : void
e DrawListViewItemEventArgs
리턴 void

OnDrawSubItem() 보호된 메소드

Owner draw a single subitem
protected OnDrawSubItem ( DrawListViewSubItemEventArgs e ) : void
e DrawListViewSubItemEventArgs
리턴 void

OnGiveFeedback() 보호된 메소드

protected OnGiveFeedback ( GiveFeedbackEventArgs args ) : void
args GiveFeedbackEventArgs
리턴 void

OnHandleCreated() 보호된 메소드

Called when the handle of the underlying control is created
protected OnHandleCreated ( EventArgs e ) : void
e EventArgs
리턴 void

OnItemDrag() 보호된 메소드

protected OnItemDrag ( ItemDragEventArgs e ) : void
e ItemDragEventArgs
리턴 void

OnMouseDown() 보호된 메소드

We need the click count in the mouse up event, but that is always 1. So we have to remember the click count from the preceding mouse down event.
protected OnMouseDown ( MouseEventArgs e ) : void
e MouseEventArgs
리턴 void

OnMouseLeave() 보호된 메소드

When the mouse leaves the control, remove any hot item highlighting
protected OnMouseLeave ( EventArgs e ) : void
e EventArgs
리턴 void

OnMouseMove() 보호된 메소드

When the mouse moves, we might need to change the hot item.
protected OnMouseMove ( MouseEventArgs e ) : void
e MouseEventArgs
리턴 void

OnMouseUp() 보호된 메소드

Check to see if we need to start editing a cell
protected OnMouseUp ( MouseEventArgs e ) : void
e MouseEventArgs
리턴 void

OnQueryContinueDrag() 보호된 메소드

protected OnQueryContinueDrag ( QueryContinueDragEventArgs args ) : void
args QueryContinueDragEventArgs
리턴 void

OnRightMouseUp() 보호된 메소드

The user right clicked on the control
protected OnRightMouseUp ( MouseEventArgs e ) : void
e MouseEventArgs
리턴 void

OnSelectedIndexChanged() 보호된 메소드

This method is called every time a row is selected or deselected. This can be a pain if the user shift-clicks 100 rows. We override this method so we can trigger one event for any number of select/deselects that come from one user action
protected OnSelectedIndexChanged ( EventArgs e ) : void
e EventArgs
리턴 void

PauseAnimations() 공개 메소드

Pause (or unpause) all animations in the list
public PauseAnimations ( bool isPause ) : void
isPause bool true to pause, false to unpause
리턴 void

PossibleFinishCellEditing() 공개 메소드

If a cell edit is in progress, finish the edit.
This method does not guarantee that the editing will finish. The validation process can cause the finishing to be aborted. Developers should check the return value or use IsCellEditing property after calling this method to see if the user is still editing a cell.
public PossibleFinishCellEditing ( ) : bool
리턴 bool

PossibleFinishCellEditing() 공개 메소드

If a cell edit is in progress, finish the edit.
This method does not guarantee that the editing will finish. The validation process can cause the finishing to be aborted. Developers should check the return value or use IsCellEditing property after calling this method to see if the user is still editing a cell.
public PossibleFinishCellEditing ( bool expectingCellEdit ) : bool
expectingCellEdit bool True if it is likely that another cell is going to be /// edited immediately after this cell finishes editing
리턴 bool

PostProcessOneRow() 보호된 메소드

Do the work required after one item in a listview have been created
protected PostProcessOneRow ( int rowIndex, int displayIndex, OLVListItem olvi ) : void
rowIndex int
displayIndex int
olvi OLVListItem
리턴 void

PostProcessRows() 보호된 메소드

Do the work required after the items in a listview have been created
protected PostProcessRows ( ) : void
리턴 void

ProcessDialogKey() 보호된 메소드

Handle a key press on this control. We specifically look for F2 which edits the primary column, or a Tab character during an edit operation, which tries to start editing on the next (or previous) cell.
protected ProcessDialogKey ( Keys keyData ) : bool
keyData Keys
리턴 bool

ProcessHyperlinkClicked() 보호된 메소드

Tell the world that a hyperlink was clicked and if the event isn't handled, do the default processing.
protected ProcessHyperlinkClicked ( CellClickEventArgs e ) : void
e CellClickEventArgs
리턴 void

ProcessLButtonDoubleClick() 보호된 메소드

Handle a mouse double click at the given hit test location
Subclasses can override this to do something unique
protected ProcessLButtonDoubleClick ( OlvListViewHitTestInfo hti ) : bool
hti OlvListViewHitTestInfo
리턴 bool

ProcessLButtonDown() 보호된 메소드

Handle a left mouse down at the given hit test location
Subclasses can override this to do something unique
protected ProcessLButtonDown ( OlvListViewHitTestInfo hti ) : bool
hti OlvListViewHitTestInfo
리턴 bool

ProcessRButtonDoubleClick() 보호된 메소드

Handle a right mouse double click at the given hit test location
Subclasses can override this to do something unique
protected ProcessRButtonDoubleClick ( OlvListViewHitTestInfo hti ) : bool
hti OlvListViewHitTestInfo
리턴 bool

ProcessRButtonDown() 보호된 메소드

Handle a left mouse down at the given hit test location
Subclasses can override this to do something unique
protected ProcessRButtonDown ( OlvListViewHitTestInfo hti ) : bool
hti OlvListViewHitTestInfo
리턴 bool

PutCheckState() 보호된 메소드

Record the change of checkstate for the given object in the model. This does not update the UI -- only the model
protected PutCheckState ( Object modelObject, CheckState state ) : CheckState
modelObject Object
state CheckState
리턴 CheckState

RebuildColumns() 공개 메소드

Rebuild the columns based upon its current view and column visibility settings
public RebuildColumns ( ) : void
리턴 void

RefreshHotItem() 공개 메소드

Force the hot item to be recalculated
public RefreshHotItem ( ) : void
리턴 void

RefreshItem() 공개 메소드

Update the ListViewItem with the data from its associated model.
This method does not resort or regroup the view. It simply updates the displayed data of the given item
public RefreshItem ( OLVListItem olvi ) : void
olvi OLVListItem
리턴 void

RefreshObject() 공개 메소드

Update the rows that are showing the given objects
This method does not resort or regroup the view.
public RefreshObject ( object modelObject ) : void
modelObject object
리턴 void

RefreshObjects() 공개 메소드

Update the rows that are showing the given objects

This method does not resort or regroup the view.

This method can safely be called from background threads.

public RefreshObjects ( IList modelObjects ) : void
modelObjects IList
리턴 void

RefreshOverlay() 공개 메소드

Refresh the display of just one overlays
public RefreshOverlay ( IOverlay overlay ) : void
overlay IOverlay
리턴 void

RefreshOverlays() 공개 메소드

Refresh the display of the overlays
public RefreshOverlays ( ) : void
리턴 void

RefreshSelectedObjects() 공개 메소드

Update the rows that are selected
This method does not resort or regroup the view.
public RefreshSelectedObjects ( ) : void
리턴 void

RemoveDecoration() 공개 메소드

Remove the given decoration from this list
public RemoveDecoration ( IDecoration decoration ) : void
decoration IDecoration The decoration to remove
리턴 void

RemoveObject() 공개 메소드

Remove the given model object from the ListView
See RemoveObjects() for more details

This method is thread-safe.

public RemoveObject ( object modelObject ) : void
modelObject object The model to be removed
리턴 void

RemoveObjects() 공개 메소드

Remove all of the given objects from the control.

Nulls and model objects that are not in the ListView are silently ignored.

This method is thread-safe.

public RemoveObjects ( ICollection modelObjects ) : void
modelObjects ICollection Collection of objects to be removed
리턴 void

RemoveOverlay() 공개 메소드

Remove the given overlay to those on this list
public RemoveOverlay ( IOverlay overlay ) : void
overlay IOverlay The overlay
리턴 void

Reset() 공개 메소드

Make the list forget everything -- all rows and all columns
Use ClearObjects if you want to remove just the rows.
public Reset ( ) : void
리턴 void

ResetColumnFiltering() 공개 메소드

Remove all column filtering.
public ResetColumnFiltering ( ) : void
리턴 void

ResizeFreeSpaceFillingColumns() 보호된 메소드

Resize our space filling columns so they fill any unoccupied width in the control
protected ResizeFreeSpaceFillingColumns ( ) : void
리턴 void

ResizeFreeSpaceFillingColumns() 보호된 메소드

Resize our space filling columns so they fill any unoccupied width in the control
protected ResizeFreeSpaceFillingColumns ( int freeSpace ) : void
freeSpace int
리턴 void

RestoreState() 공개 메소드

Restore the state of the control from the given string, which must have been produced by SaveState()
public RestoreState ( byte state ) : bool
state byte A byte array returned from SaveState()
리턴 bool

SaveState() 공개 메소드

Return a byte array that represents the current state of the ObjectListView, such that the state can be restored by RestoreState()

The state of an ObjectListView includes the attributes that the user can modify: current view (i.e. Details, Tile, Large Icon...) sort column and direction column order column widths column visibility

It does not include selection or the scroll position.

public SaveState ( ) : byte[]
리턴 byte[]

SelectAll() 공개 메소드

Select all rows in the listview
public SelectAll ( ) : void
리턴 void

SelectObject() 공개 메소드

Select the row that is displaying the given model object, in addition to any current selection.
Use the SelectedObject property to deselect all other rows
public SelectObject ( object modelObject ) : void
modelObject object The object to be selected
리턴 void

SelectObject() 공개 메소드

Select the row that is displaying the given model object, in addition to any current selection.
Use the SelectedObject property to deselect all other rows
public SelectObject ( object modelObject, bool setFocus ) : void
modelObject object The object to be selected
setFocus bool Should the object be focused as well?
리턴 void

SelectObjects() 공개 메소드

Select the rows that is displaying any of the given model object. All other rows are deselected.
public SelectObjects ( IList modelObjects ) : void
modelObjects IList A collection of model objects
리턴 void

SetControlValue() 보호된 메소드

Try to give the given value to the provided control. Fall back to assigning a string if the value assignment fails.
protected SetControlValue ( Control control, Object value, String stringValue ) : void
control Control A control
value Object The value to be given to the control
stringValue String The string to be given if the value doesn't work
리턴 void

SetNativeBackgroundImage() 공개 메소드

Set the given image to be background of the ListView so that it appears at the given percentage offsets within the list.

This has the same limitations as described in SetNativeBackgroundWatermark. Make sure those limitations are understood before using the method.

This is very similar to setting the System.Windows.Forms.Control.BackgroundImage property of the standard .NET ListView, except that the standard BackgroundImage does not handle images with transparent areas properly -- it renders transparent areas as black. This method does not have that problem.

Setting this clears any background watermark.

public SetNativeBackgroundImage ( Image image, int xOffset, int yOffset ) : void
image Image The image to be drawn. If null, any existing image will be removed.
xOffset int The horizontal percentage where the image will be placed. 0 is absolute left, 100 is absolute right.
yOffset int The vertical percentage where the image will be placed.
리턴 void

SetNativeBackgroundTiledImage() 공개 메소드

Set the given image to be the tiled background of the ListView.

This has the same limitations as described in SetNativeBackgroundWatermark and SetNativeBackgroundImage. Make sure those limitations are understood before using the method.

public SetNativeBackgroundTiledImage ( Image image ) : void
image Image The image to be drawn. If null, any existing image will be removed.
리턴 void

SetNativeBackgroundWatermark() 공개 메소드

Set the given image to be fixed in the bottom right of the list view. This image will not scroll when the list view scrolls.

This method uses ListView's native ability to display a background image. It has a few limitations:

It doesn't work well with owner drawn mode. In owner drawn mode, each cell draws itself, including its background, which covers the background image. It doesn't look very good when grid lines are enabled, since the grid lines are drawn over the image. It does not work at all on XP. Obviously, it doesn't look good when alternate row background colors are enabled.

If you can live with these limitations, native watermarks are quite neat. They are true backgrounds, not translucent overlays like the OverlayImage uses. They also have the decided advantage over overlays in that they work correctly even in MDI applications.

Setting this clears any background image.

public SetNativeBackgroundWatermark ( Image image ) : void
image Image The image to be drawn. If null, any existing image will be removed.
리턴 void

SetObjectCheckedness() 보호된 메소드

Change the check state of the given object to be the given state.
If the given model object isn't in the list, we still try to remember its state, in case it is referenced in the future.
protected SetObjectCheckedness ( object modelObject, CheckState state ) : void
modelObject object
state CheckState
리턴 void

SetObjects() 공개 메소드

Set the collection of objects that will be shown in this list view.
The list is updated immediately
public SetObjects ( IEnumerable collection ) : void
collection IEnumerable The objects to be displayed
리턴 void

SetObjects() 공개 메소드

Set the collection of objects that will be shown in this list view.
The list is updated immediately
public SetObjects ( IEnumerable collection, bool preserveState ) : void
collection IEnumerable The objects to be displayed
preserveState bool Should the state of the list be preserved as far as is possible.
리턴 void

SetPersistentCheckState() 보호된 메소드

Remember the check state of the given model object
protected SetPersistentCheckState ( object model, CheckState state ) : CheckState
model object The model to be remembered
state CheckState The model's checkedness
리턴 CheckState

SetSubItemImage() 공개 메소드

Set the subitem image natively
public SetSubItemImage ( int rowIndex, int subItemIndex, OLVListSubItem subItem, bool shouldClearImages ) : void
rowIndex int
subItemIndex int
subItem OLVListSubItem
shouldClearImages bool
리턴 void

SetSubItemImages() 보호된 메소드

Tell the underlying list control which images to show against the subitems
protected SetSubItemImages ( int rowIndex, OLVListItem item ) : void
rowIndex int the index at which the item occurs
item OLVListItem the item whose subitems are to be set
리턴 void

SetSubItemImages() 보호된 메소드

Tell the underlying list control which images to show against the subitems
protected SetSubItemImages ( int rowIndex, OLVListItem item, bool shouldClearImages ) : void
rowIndex int the index at which the item occurs
item OLVListItem the item whose subitems are to be set
shouldClearImages bool will existing images be cleared if no new image is provided?
리턴 void

SetupSubItemCheckBoxes() 공개 메소드

Setup this control so it can display check boxes on subitems (or primary checkboxes in virtual mode)
This gives the ListView a small image list, if it doesn't already have one.
public SetupSubItemCheckBoxes ( ) : void
리턴 void

ShouldStartCellEdit() 보호된 메소드

Should we start editing the cell in response to the given mouse button event?
protected ShouldStartCellEdit ( MouseEventArgs e ) : bool
e MouseEventArgs
리턴 bool

ShowHeaderRightClickMenu() 보호된 메소드

Show a menu that is appropriate when the given column header is clicked.
protected ShowHeaderRightClickMenu ( int columnIndex, Point pt ) : bool
columnIndex int The index of the header that was clicked. This /// can be -1, indicating that the header was clicked outside of a column
pt Point Where should the menu be shown
리턴 bool

ShowOverlays() 공개 메소드

Make sure that any overlays are visible.
public ShowOverlays ( ) : void
리턴 void

ShowSortIndicator() 공개 메소드

Put a sort indicator next to the text of the sort column
public ShowSortIndicator ( ) : void
리턴 void

ShowSortIndicator() 보호된 메소드

Put a sort indicator next to the text of the given given column
protected ShowSortIndicator ( OLVColumn columnToSort, SortOrder sortOrder ) : void
columnToSort OLVColumn The column to be marked
sortOrder SortOrder The sort order in effect on that column
리턴 void

Sort() 공개 메소드

Sort the items by the last sort column and order
public Sort ( ) : void
리턴 void

Sort() 공개 메소드

Sort the items in the list view by the values in the given column and the last sort order
public Sort ( OLVColumn columnToSort ) : void
columnToSort OLVColumn The column whose values will be used for the sorting
리턴 void

Sort() 공개 메소드

Sort the items in the list view by the values in the given column and by the given order.
If ShowGroups is true, the rows will be grouped by the given column. If AlwaysGroupsByColumn is not null, the rows will be grouped by that column, and the rows within each group will be sorted by the given column.
public Sort ( OLVColumn columnToSort, SortOrder order ) : void
columnToSort OLVColumn The column whose values will be used for the sorting. /// If null, the first column will be used.
order SortOrder The ordering to be used for sorting. If this is None, /// this.Sorting and then SortOrder.Ascending will be used
리턴 void

Sort() 공개 메소드

Sort the items in the list view by the values in the given column and the last sort order
public Sort ( int columnToSortIndex ) : void
columnToSortIndex int The index of the column whose values will be used for the sorting
리턴 void

Sort() 공개 메소드

Sort the items in the list view by the values in the given column and the last sort order
public Sort ( string columnToSortName ) : void
columnToSortName string The name of the column whose values will be used for the sorting
리턴 void

StandardHyperlinkClickedProcessing() 보호된 메소드

Do the default processing for a hyperlink clicked event, which is to try and open the url.
protected StandardHyperlinkClickedProcessing ( HyperlinkClickedEventArgs args ) : void
args HyperlinkClickedEventArgs
리턴 void

StartCellEdit() 공개 메소드

Really start an edit operation on a given cell. The parameters are assumed to be sane.
public StartCellEdit ( OLVListItem item, int subItemIndex ) : void
item OLVListItem The row to be edited
subItemIndex int The index of the cell to be edited
리턴 void

TakeOwnershipOfObjects() 보호된 메소드

Take ownership of the 'objects' collection. This separats our collection from the source.

This method separates the 'objects' instance variable from its source, so that any AddObject/RemoveObject calls will modify our collection and not the original colleciton.

This method has the intentional side-effect of converting our list of objects to an ArrayList.

protected TakeOwnershipOfObjects ( ) : void
리턴 void

ToggleCheckObject() 공개 메소드

Toggle the checkedness of the given object. A checked object becomes unchecked; an unchecked or indeterminate object becomes checked. If the list has tristate checkboxes, the order is: unchecked -> checked -> indeterminate -> unchecked ...
public ToggleCheckObject ( object modelObject ) : void
modelObject object The model object to be checked
리턴 void

ToggleSubItemCheckBox() 공개 메소드

Toggle the check at the check box of the given cell
public ToggleSubItemCheckBox ( object rowObject, OLVColumn column ) : void
rowObject object
column OLVColumn
리턴 void

TriggerFormatRowEvent() 보호된 메소드

Trigger FormatRow and possibly FormatCell events for the given item
protected TriggerFormatRowEvent ( int rowIndex, int displayIndex, OLVListItem olvi ) : void
rowIndex int
displayIndex int
olvi OLVListItem
리턴 void

TriggerGroupExpandCollapse() 보호된 메소드

Trigger a GroupExpandCollapse event and return true if the action was cancelled
protected TriggerGroupExpandCollapse ( OLVGroup group ) : bool
group OLVGroup
리턴 bool

UnapplyHotItem() 보호된 메소드

Remove hot item styling from the given row
protected UnapplyHotItem ( int index ) : void
index int
리턴 void

UncheckObject() 공개 메소드

Mark the given object as unchecked in the list
public UncheckObject ( object modelObject ) : void
modelObject object The model object to be unchecked
리턴 void

UncheckObjects() 공개 메소드

Mark the given objects as unchecked in the list
public UncheckObjects ( IEnumerable modelObjects ) : void
modelObjects IEnumerable The model object to be checked
리턴 void

UncheckSubItem() 공개 메소드

Uncheck the check at the given cell
public UncheckSubItem ( object rowObject, OLVColumn column ) : void
rowObject object
column OLVColumn
리턴 void

Unfreeze() 공개 메소드

Unfreeze the listview. If this call is the outermost Unfreeze(), the contents of the listview will be rebuilt.
Freeze()/Unfreeze() calls nest correctly
public Unfreeze ( ) : void
리턴 void

Unsort() 공개 메소드

Remove any sorting and revert to the given order of the model objects
public Unsort ( ) : void
리턴 void

UpdateCellToolTipHandle() 보호된 메소드

Update the handle used by our cell tooltip to be the tooltip used by the underlying Windows listview control.
protected UpdateCellToolTipHandle ( ) : void
리턴 void

UpdateColumnFiltering() 공개 메소드

Update the filtering of this ObjectListView based on the value filtering defined in each column
public UpdateColumnFiltering ( ) : void
리턴 void

UpdateFiltering() 보호된 메소드

When some setting related to filtering changes, this method is called.
protected UpdateFiltering ( ) : void
리턴 void

UpdateHotItem() 보호된 메소드

The mouse has moved to the given pt. See if the hot item needs to be updated
This is the main entry point for hot item handling
protected UpdateHotItem ( OlvListViewHitTestInfo hti ) : void
hti OlvListViewHitTestInfo
리턴 void

UpdateHotItem() 보호된 메소드

The mouse has moved to the given pt. See if the hot item needs to be updated
This is the main entry point for hot item handling
protected UpdateHotItem ( Point pt ) : void
pt Point Where is the mouse?
리턴 void

UpdateHotRow() 보호된 메소드

Update the given row using the current hot item information
protected UpdateHotRow ( OLVListItem olvi ) : void
olvi OLVListItem
리턴 void

UpdateHotRow() 보호된 메소드

Update the given row using the given hot item information
protected UpdateHotRow ( int rowIndex, int columnIndex, HitTestLocation hitLocation, OLVListItem olvi ) : void
rowIndex int
columnIndex int
hitLocation HitTestLocation
olvi OLVListItem
리턴 void

UpdateNotificationSubscriptions() 보호된 메소드

Change any subscriptions to INotifyPropertyChanged events on our current model objects so that we no longer listen for events on the old models and do listen for events on the given collection.
This does nothing if UseNotifyPropertyChanged is false.
protected UpdateNotificationSubscriptions ( IEnumerable collection ) : void
collection IEnumerable
리턴 void

WndProc() 보호된 메소드

Override the basic message pump for this control
protected WndProc ( Message &m ) : void
m Message
리턴 void

프로퍼티 상세

EditorRegistry 공개적으로 정적으로 프로퍼티

This registry decides what control should be used to edit what cells, based on the type of the value in the cell.
All instances of ObjectListView share the same editor registry.
public static EditorRegistry EditorRegistry
리턴 EditorRegistry

SortAscendingImage 공개적으로 정적으로 프로퍼티

Gets or sets the image that will be place next to the Sort Ascending command
public static Bitmap SortAscendingImage
리턴 Bitmap

SortDescendingImage 공개적으로 정적으로 프로퍼티

Gets or sets the image that will be placed next to the Sort Descending command
public static Bitmap SortDescendingImage
리턴 Bitmap