Features:
The window messages are compatible the tree control of the common controls.
Alternated colors for each line.
The color, style and icon could be set for each item sepperate.
MFC class is also implemented (CTreeCtrl is the base class)
An index access is implemented, so you can get the item of a line.
A user data fiel could be added to each item.
Auto-Edit option with text tabels for combo boxes.
The main source code is in the file TreeListWnd.cpp. The MFC class is in the TreeListCtrl.cpp file. A documentation of the control is in CTreeListCtrl.chm.
Below are some of the many features that CTreeListCtrl
has:
CTreeCtrl
& CListCtrl
CTreeListCtrl
This project was written to provide you with a Tree List to put on any CView
. It supports images, checkboxes, and all the functionality of both CTree
and CList
Controls. It automatically resizes itself when user changes the window it has been attached to it. Clicking on the List Header will sort the tree either in ascending or descending order. Just have a look at the attached code and if you have any problems don't hesitate to mail me. All source code is provided in zips below. Just download and enjoy ! :)
Okay yet another full blown ownerdraw listview control with a tree like thing in the first column.
WM_PAINT
message. That's very simple but a little bit slow (in my tests) if you have many tree items (about 500 and more).Environment: VC6 and .NET, IE5 (comctl32.dll version 5.80)
Why another multi-column tree view? Because most of the solutions I've seen re-invent the wheel by creating a completely new control. My code is only 12 Kb long and it works excellently if you don't need all those colors, fonts, sorting, and whatever. You can use the CColumnTreeView class in place of CTreeView with almost no modifications.
This class uses a standard tree control and a standard header control and just does a few tricks for drawing multi-column text and to scroll the view horizontally if that's necessary. It doesn't use any custom data structures, and you can use normal functionality of the CTreeCtrl object returned by the GetTreeCtrl function. So, you don't have to rewrite the existing code. Item text can be split into columns by using the '\t' (tabulator) character. You can't directly change a single column's text, but in most cases this is not necessary.
The CColumnTreeCtrl control can be used in MFC projects where a hybrid of tree and list is needed (see the picture above).
This control lets you edit variables of objects. The control is designed to ease as much pain as possible, and as a result, only a single line of code is needed to represent each property in the control. Yes, other property controls are out there already, but this one, in my humble opinion, offers exceptional ease of use. Please comment in any way you like.
The CPropTree
class implements a tree control that is similar to the property view seen in Visual Studio .Net. The source project compiles to a DLL so you can easily incorporate it into your project. You can check my web page for more information on the control.
The control has two window areas:
In this article, I will describe implementing native WinForms TreeView
and ListView
descendants that are flicker-free. The solution will be described in several iterations which are connected to actual development in time. All this is created for and used in my freeware file manager Nomad.NET.
TreeView
or ListView
controls, you already notice massive flickering when control size changes (for example, when you change form size with mouse). In this article, I will try to find workarounds for this behavior and eliminate flickering by using double buffering. When I first noticed this problem, I did some Googling and didn't find any solutions, so I have invented several solutions by myself.When we are typing in Visual Studio, there is a auto-completion list for us to complete the parameter infomation for the function we typed or function names for a class. I encountered a requirement that the user should be able to select some words from a tree control to complete the current place in the an editor. So I created this control.
CTreeCtrl
. You can create it using CreateTree
with the size, parent window and optional bitmap icons. When you need to display the control, simply use the member function ShowMe
with default parameters. When you double-click on a tree item, the window of the tree control will be closed and it will send a message to the parent window with selected string.( # )
聯(lián)系客服