hierarchy – 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 Better ListView 2.00 released http://www.componentowl.com/blog/better-listview-2-00-released/ http://www.componentowl.com/blog/better-listview-2-00-released/#respond Sun, 31 Jul 2011 15:25:39 +0000 http://www.componentowl.com/blog/?p=304 A new major version of Better ListView has been released! Download the new version.

Item hierarchy with multi-line items in groups

Item hierarchy with multi-line items in groups

Summary of what’s new:

We have added four new major features:

  • Groups – items can be organized in collapsible groups
  • Item Hierarchy – items can be organized in a tree structure, can be also collapsed just like the nodes in a TreeView
  • Multi-Line Items – item texts can break in several lines and each item can have different size
  • Data Binding – complex data binding is fully supported, any List, DataTable, DataView, array or any other IList-type object can be bound to Better ListView as a data source

Many existing features of Better ListView has been enhanced in favor of these. For example:

  • Item reordering can be done with hierarchical items as well; user can even create child items
  • It is possible to move items between different groups

Some of the minor features added are:

  • Layouts can be adjustable – item sizes and spacings, even internal spacings
  • Added new label editing controls (calendar and drop down box)
  • Better ListView content (columns, items and groups) can be saved to file (XML or binary)
  • Multi-line items support added
  • See full changelog for details

We have also fixed many issues and improved performance of Thumbnails view and operations with collections.

About then new version

The new version 2.00 brings new major features, the most important one being item hierarchy support. This allows you to create tree-list structures in the list view, without having to sacrifice any of the list view functionality (columns, sorting, grouping, Drag and Drop reordering, etc).

Highly customizable item grouping capabilities were added. Individual group headers can have customized look and behavior. The group headers can be collapsible, support images, custom context menus, are focusable, and more.

Version 2.0 also improves the thumbnail view. The control handles larger images smoothly, even while resizing.

List items, group headers and column header can newly have custom padding specified for all of their elements, which makes it easy to do owner drawing of custom elements, such as overlay icons in the thumbnail view. Every part of the control can be newly replaced by custom drawing, not just overdrawn.

Version 2.0 newly allows you to save/load the list view contents with 1 just line of code, either in XML or binary format, to either file or string. Data-binding with custom column-mapping is supported as well.

Multi-line listview items are also newly supported. List items with very long text can take place of two (r more) regular items, so the text whole text is readable.

Better ListView 2

Thumbnails in groups

DataTable bound to Better ListView

DataTable bound to Better ListView

Other news – new comics for developers!

We’ve also started publishing new webcomics for developers on our website, drawn by the Better ListView lead developer, Libor Tinka.

]]>
http://www.componentowl.com/blog/better-listview-2-00-released/feed/ 0
Work in Progress: “Groups” / “Item Hierarchy” Features http://www.componentowl.com/blog/tedious-work-with-groups-and-item-hierarchy-features/ http://www.componentowl.com/blog/tedious-work-with-groups-and-item-hierarchy-features/#respond Fri, 25 Mar 2011 23:11:00 +0000 http://www.componentowl.com/blog/?p=204 We’re currently developing complex, but very useful features for the new major version of Better ListView:

  • Groups – to enable grouping items into collapsible areas with “group headers”
  • Item Hierarchy – to allow for visually organizing items like in the tree

We are facing some non-trivial obstacles on the journey You might be interested in:

Tree Structure vs List Structure

In all tree/list hybrid controls we saw there is an underlying tree structure made of nodes (like in the TreeView control). These hybrid controls are basically a tree with ability to be displayed as list.

In Better ListView, however, the primary data structure is a list, which is flat. Item hierarchy is still possible and really simple to use, just by enabling the user to set level of any item. If the item has higher level than some item above it, Better ListView will display this as a “child” item, allowing user to even collapse parent item without affecting the data structure. Sorting is also possible through “range sort”, e.g. sort only selected items or items in a certain level of hierarchy.

Compared to tree-like structure, user can still bind an IList to Better ListView or serialize/traverse through the whole item “hierarchy” with a simple foreach block.

Keeping Native Look

.NET 2.0 supports visual styles through its VisualStyleElement and VisualStyleRenderer classes, but this support is limited to basic elements. When it comes to shiny new elements that can be seen in Windows Explorer (e.g. triangular expando buttons or styles group headers), one have to hack into Windows theme to obtain correct constants. We did this nasty work to bring user visual style that matches exactly what he sees in native controls:

Visual Style Elements for Groups

Visual Style Elements for Groups

The picture shows all the elements used in “Groups” and “Item Hierarchy” features. As You can see, it is a LOT. Only group header alone has 15 (!) states that should be drawn each in its specific situation. And Better ListView will handle all of them automatically for you.

We’ve taken customized themes into consideration, as well as older themes like “Vista Basic” or “XP Luna” or “Classic”. In all cases, we test control display thoroughly to obtain consistent results (a solid reference for us is a good old Windows Explorer as it shows most up-to-date wonders of native ListView control in each version of Windows at one place).

]]>
http://www.componentowl.com/blog/tedious-work-with-groups-and-item-hierarchy-features/feed/ 0