nonselectable – Owl's Blog on .NET development http://www.componentowl.com/blog Component Owl codes Better ListView control all night so you don't have to. Tue, 04 Sep 2018 13:10:05 +0000 en-US hourly 1 https://wordpress.org/?v=4.9.8 Non-selectable Items in Better ListView http://www.componentowl.com/blog/non-selectable-items-in-better-listview/ http://www.componentowl.com/blog/non-selectable-items-in-better-listview/#respond Wed, 25 Jan 2012 12:08:17 +0000 http://www.componentowl.com/blog/?p=476 One of our users asked us whether it would be possible to make specific Better ListView items to be non-selectable because he wanted to have them in “disabled” state.

We quickly realized that it might be very useful, in some cases, to have items with informative character only. Some of such non-selectable items can even be used as separators with the help of owner drawing:

Non-selectable items

Non-selectable items

The non-selectable items behave just as their name suggests. They cannot be focused (they are skipped when jumping from item to item with arrow keys) and do not respond to drag selection:

Non-selectable items

Non-selectable items

It is very easy to set-up such items. Simply set BetterListViewItem.Selectable property to false.

The non-selectable items are displayed in the same way as normal items. They can contain child items (which are selectable until their Selectable property is set to false) and can be interactively expanded/collapsed.

If you need to have all items non-selectable to use Better ListView for display-only, consider using the Read-only mode, which has been also introduced in version 2.5.

]]>
http://www.componentowl.com/blog/non-selectable-items-in-better-listview/feed/ 0
Combined Items in Better ListView http://www.componentowl.com/blog/combined-items-in-better-listview/ http://www.componentowl.com/blog/combined-items-in-better-listview/#respond Thu, 05 Jan 2012 09:46:49 +0000 http://www.componentowl.com/blog/?p=478 Hierarchical (tree-like) items can be used to support non-selectable child items in Better ListView 2.5.0 and newer. We call these Combined items as they are combined with its children to look and behave as single item:

Combined items

Combined items

Combined item has selection ranging over all its child items. This can be seen when the combined item is selected or focused:

Combined items - selection

Combined items - selection

Child items of the combined item are still interactive, though not focusable/selectable. They can contain further children (be expanded/collapsed with expand button as well) and can contain interactive check boxes. The visual part of combined child items is also fully available, to the child items can contain images and even sub-items.

To set-up combined items, simply set AllowSelectChildItems property to false on all items you wish to combine.

Combined items can be used in any level of item hierarchy.

]]>
http://www.componentowl.com/blog/combined-items-in-better-listview/feed/ 0