List control with single / double separator lines Tennessee

Placing row and column seperators in a listview

Local Companies

Computer Services
615-252-8044
230 Willow St
Nashville, TN
Simple Solutions
(901) 289-0089
4499 Seven Valley Cove
Memphis, TN
Cyberangel Security Solutions Inc
615-837-9191
475 Metroplex DR
Nashville, TN
C M S Manufacturing Systems
615-662-3102
131 Belle Forest Cir
Nashville, TN
Impressive Publshing
423-239-4656
1400 E. Shipley Ferry Rd.
Kingsport, TN
Advanced Technical Services
615-747-5810
200 Hill Ave
Nashville, TN
Expeditors International
(901) 362-9771
5395 Distriplex Farms Drive
Memphis, TN
Advanced Network Solutions
615-277-0500
105 Broadway
Nashville, TN
Peachtree Software Support
615-256-1111
415 4th Ave S
Nashville, TN
Cbnc LLC
615-831-3270
5360 Edmondson Pike
Nashville, TN

provided by: 
Originally published at Internet.com


This article describes how to add separator lines (single line or double line) to a list control derived from CListCtrl. This technique requires that the list control is owner drawn. This article also demonstrates how to prevent row selection in a list control.

grid_separator.gif (2590 bytes)

How to do it?



Let's assume that we have a class TVisualListCtrl derived from CListCtrl. Objects of this class correspond to list control resources (each list control must be ownerdrawn). In order to implement support for separator lines, we have to add several features to this class.

Step 1.

Add a public enum type containing the separator line identifiers and 2 public functions for inserting a separator line and checking whether the item is separator or not. class TVisualCtrlList : public CListCtrl { public: enum ESeparator { SEPARATOR_SINGLE, SEPARATOR_DOUBLE }; ..... public: .... BOOL IsSeparator(int row); int InsertSeparator(int row, ESeparator separator = SEPARATOR_SINGLE); };

Also create 2 constant strings (within a class or as local variables in a .cpp implementation file) which are inserted into the list control. These strings have a special meaning to the class implementation since they are actually aliases to separator lines. const CString SingleSeparator = _T("--"); const CString DoubleSeparator = _T("==="); ...

Read article at Internet.com site

Featured Local Company

Advanced Technical Services

615-747-5810
200 Hill Ave
Nashville, TN

Regional Articles
- List control with single / double separator lines Antioch TN
- List control with single / double separator lines Ashland City TN
- List control with single / double separator lines Brentwood TN
- List control with single / double separator lines Bristol TN
- List control with single / double separator lines Chattanooga TN
- List control with single / double separator lines Clarksville TN
- List control with single / double separator lines Cleveland TN
- List control with single / double separator lines Collierville TN
- List control with single / double separator lines Columbia TN
- List control with single / double separator lines Cookeville TN
- List control with single / double separator lines Cordova TN
- List control with single / double separator lines Crossville TN
- List control with single / double separator lines Dickson TN
- List control with single / double separator lines Dyersburg TN
- List control with single / double separator lines Elizabethton TN
- List control with single / double separator lines Franklin TN
- List control with single / double separator lines Gallatin TN
- List control with single / double separator lines Germantown TN
- List control with single / double separator lines Goodlettsville TN
- List control with single / double separator lines Greeneville TN
- List control with single / double separator lines Harriman TN
- List control with single / double separator lines Hendersonville TN
- List control with single / double separator lines Hermitage TN
- List control with single / double separator lines Hixson TN
- List control with single / double separator lines Humboldt TN
- List control with single / double separator lines Jackson TN
- List control with single / double separator lines Johnson City TN
- List control with single / double separator lines Jonesborough TN
- List control with single / double separator lines Kingsport TN
- List control with single / double separator lines Knoxville TN
- List control with single / double separator lines La Follette TN
- List control with single / double separator lines La Vergne TN
- List control with single / double separator lines Lebanon TN
- List control with single / double separator lines Lenoir City TN
- List control with single / double separator lines Loudon TN
- List control with single / double separator lines Madison TN
- List control with single / double separator lines Martin TN
- List control with single / double separator lines Maryville TN
- List control with single / double separator lines Mc Minnville TN
- List control with single / double separator lines Memphis TN
- List control with single / double separator lines Millington TN
- List control with single / double separator lines Morristown TN
- List control with single / double separator lines Mount Juliet TN
- List control with single / double separator lines Murfreesboro TN
- List control with single / double separator lines Nashville TN
- List control with single / double separator lines Oak Ridge TN
- List control with single / double separator lines Old Hickory TN
- List control with single / double separator lines Ooltewah TN
- List control with single / double separator lines Ripley TN
- List control with single / double separator lines Rogersville TN
- List control with single / double separator lines Sevierville TN
- List control with single / double separator lines Shelbyville TN
- List control with single / double separator lines Signal Mountain TN
- List control with single / double separator lines Smyrna TN
- List control with single / double separator lines Soddy Daisy TN
- List control with single / double separator lines Tullahoma TN

Topics: 
Architecture & Design Languages & Tools Project Management Web Services
Database Microsoft & .NET Security Wireless
Java Open Source Techniques XML