sub-item – 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 Centering Images in Better ListView Sub-items http://www.componentowl.com/blog/centering-images-in-better-listview-sub-items/ http://www.componentowl.com/blog/centering-images-in-better-listview-sub-items/#respond Wed, 06 Aug 2014 21:14:10 +0000 http://www.componentowl.com/blog/?p=906 Centered images in Better ListView

Centered images in Better ListView

Better ListView 3.11 supports aligning images in sub-items and columns to center. Simply set AlignHorizontalImage property of an sub-item or column to BetterListViewImageAlignmentHorizontal.OverlayCenter.

The image will be centered inside available space regardless of text.

This is useful for sub-items and column headers consisting of image only.

]]>
http://www.componentowl.com/blog/centering-images-in-better-listview-sub-items/feed/ 0
Sub-item Check Boxes in Better ListView http://www.componentowl.com/blog/sub-item-check-boxes-in-better-listview/ http://www.componentowl.com/blog/sub-item-check-boxes-in-better-listview/#respond Sun, 06 Jul 2014 21:48:41 +0000 http://www.componentowl.com/blog/?p=901 Better ListView Sub-item Check Boxes

Better ListView Sub-item Check Boxes

Better ListView 3.10.0 allows displaying fully interactive check boxes and even radio buttons in sub-item cells.

This feature can be activated simply by setting CheckBoxAppearance property of a given sub-item to other value than Hide. Such sub-item will not display check box or radio instead of image and text.

Please note the first sub-item’s properties do not apply as they are overriden by item’s properties. These two are separate for the case of column reordering (keeping consistency of sub-item states).

Another new feature in Better ListView is that check boxes or radios can be displayed disabled. This can be achieved by setting CheckEnabled property to false on the respective item or sub-item.

Sub-item check boxes can be operated by both mouse and keyboard. Checking sub-item with keyboard can be done by navigating focus rectangle by arrow keys to the given sub-item and pressing spacebar.

]]>
http://www.componentowl.com/blog/sub-item-check-boxes-in-better-listview/feed/ 0
Right-aligned Images in Better ListView http://www.componentowl.com/blog/right-aligned-images-in-better-listview/ http://www.componentowl.com/blog/right-aligned-images-in-better-listview/#respond Thu, 19 Apr 2012 19:15:13 +0000 http://www.componentowl.com/blog/?p=780 Better ListView 2.9.0 now supports more customizable image alignment. For example, images can be aligned on the right part of item:

Right-aligned Images

Right-aligned Images

The alignment can be set separately on every sub-item (using AlignImageHorizontal and AlignImageVertical properties).

Moreover, the right-aligned images can be used in column headers and groups:

Group image alignment

Group image alignment

The alignment of images is similar to that of text. Every image has its frame, which can be possibly larger than the image itself. In such case, the image needs to be further aligned within the frame. This has been done automatically by centering the image within frame, but now you have full control over the alignment.

]]>
http://www.componentowl.com/blog/right-aligned-images-in-better-listview/feed/ 0
Vertical Alignment and Text Wrapping in Better ListView http://www.componentowl.com/blog/vertical-alignment-and-text-wrapping-in-better-listview/ http://www.componentowl.com/blog/vertical-alignment-and-text-wrapping-in-better-listview/#comments Wed, 16 Nov 2011 23:57:39 +0000 http://www.componentowl.com/blog/?p=437 .NET ListView supports horizontal alignment of text in columns, items, sub-items and groups. Since Better ListView adds many new features, like multi-line items and images of arbitrary size, vertical alignment comes in handy.

By default, each view has its defaults, but you can customize text alignment on every column, item, sub-item and group individually:

Vertical alignments of text

Vertical alignments of text

The vertical alignment feature is a new property of each element type. For example, .NET ListView item has a property called Align which refers to horizontal alignment. Better ListView extends this to two independent properties called AlignHorizontal and AlignVertical. The naming scheme is same for columns, items, sub-items and groups.

Better ListView also supports splitting text in column headers and items (sub-items) into multiple lines.

We extended this functionality by adding a BetterListViewItem.TextWrapping and BetterListViewSubItem.TextWrapping properties. With these, you can control how the text in sub-items will be wrapped. There are three possible values:

  • Layout – the text will be wrapped to multiple lines, up to value specified by MaximumTextLines property of the corresponding view (layout)
  • None – the text will not be wrapped at all
  • Space – the text will be wrapped, but only to available space (item will never get higher due to wrapping text in sub-item with this setting)
The following screenshot shows these three wrapping modes in action:
Various text wrapping modes

Various text wrapping modes

The sub-item in the first column has TextWrapping set to Layout and the layout has MaximumTextLines set to 4. The sub-item text thus can be split to up to four lines. It is actually split just to three because the column is wide enough.

The sub-item in the second column has TextWrapping set to None, which means the text in this sub-item is kept on single line.

The sub-item in the third column has TextWrapping set to Space. As you can see, even if the MaximumTextLines is set to 4, the sub-item text is limited to three lines, preventing item to grow larger.

]]>
http://www.componentowl.com/blog/vertical-alignment-and-text-wrapping-in-better-listview/feed/ 1