打开APP
userphoto
未登录

开通VIP,畅享免费电子书等14项超值服

开通VIP
TreeList专题
Tree List Control  by xyz007
http://treelist-contro.sourceforge.net/

http://members.inode.at/anton.zechner/az/TreeList.en.htm

C++ Source Code

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.


     


 
A Tree List Control

Introduction

Features

Below are some of the many features that CTreeListCtrl has:

  • Compatible with CTreeCtrl & CListCtrl
  • Header drag & drop
  • Drag & drop between CTreeListCtrl
  • Transparent drag window with Alpha blend
  • Double colors of list
  • Background image
  • Check box support
  • Lock box support
  • Embedded modified controls
  • No more in future

Snapshot 1

Snapshot 2


Extended Tree List Control

Overview

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 ! :)



SuperGrid - Yet Another listview control
 

Okay yet another full blown ownerdraw listview control with a tree like thing in the first column.


 
A TreeList Control
 
  • Download source files - 21 Kb

    The Treelist control is a combination Tree/List control derived from CTreeCtrl.


  • A custom-drawn TreeList Control
     

    Introduction

    This treelist control is an owner-drawn tree control. I know that there are many treelist controls in CodeProject or CodeGuru, but I didn't find one that fits to my needs. Most of them override the 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).
     

     Multi-Column Tree View
     
    Download demo project - 32 Kb
    Download source - 5 Kb

    Environment: VC6 and .NET, IE5 (comctl32.dll version 5.80)

    Introduction

    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.

     

    Tree control with columns
     

    Introduction

    The CColumnTreeCtrl control can be used in MFC projects where a hybrid of tree and list is needed (see the picture above).

    This code is based on Michal Mecinski's control described in Multi-Column Tree View article available on CodeGuru.com. This control has several improvements and bug fixes but the general idea is the same - use standard CTreeCtrl as multi-column tree body, and CHeaderCtrl as its header.

    WPF TreeListView Control
     

    Introduction

    This articles explores the problems of standard WPF TreeView controls and describes a better way to display hierarchical data using a custom TreeListView control.
     

    JScript Tree List Control v3.0
     

    Introduction

    This is my third attempt at making a TreeListControl for Internet Explorer-based web applications. The first was very slow and required ASP to generate a tree. The second has lots of features, and even resizable columns, but, while it did not suffer from the freeze-up delays that occurred in the first one, was generally sluggish in operation if there were more than a few nodes on the screen. This latest version has tighter code and is generally more versatile all round. It doesn't have resizable columns, but it shouldn't be too hard to put them in. If I do that, I'll upload the updated version here. The only other major limitation of this control is that it is fixed-width. That is, you have to specify the exact width of each column, and this determines the control width.
     

    PropertyViewLib
     

    Introduction

    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.


    CPropTree v1.0 - Property Tree Control
     

    Introduction

    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:

    • Tree Control
    • Descriptive area


     

    COptionTree
     

     

    What's New with 2.0

    The long awaited 2.0 version is here. Good news is you get new features, new options, new items, and new bugs. Bad news is, a lot has changed so you may need to change around your current code to implement the new version. (Thanks to Tom and Irfan for there fixes for bugs that haunted me at night when the lights are off. They deserve their names in bold.)
     

     
     Double-buffered Tree and Listviews
     

    Introduction

    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

    The Problem

    If you ever use default WinForms 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.
     

     
    A float tree control like the parameter list control in Visual Studio
     

    Introduction

    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.

    How Does It Work?

    The control is publicly derived from 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.
     

     

    ( # )

    本站仅提供存储服务,所有内容均由用户发布,如发现有害或侵权内容,请点击举报
    打开APP,阅读全文并永久保存 查看更多类似文章
    猜你喜欢
    类似文章
    【热】打开小程序,算一算2024你的财运
    浅谈DevExpress<五>:TreeList简单的美化
    tree控件----展开树item的函数----CTreeCtrl::Expand
    SCI论文写作全攻略
    Python实现 Linux tree命令:用树形结构显示目录结构
    Automation testing framework introduction
    Introduction to DOJO Toolkit
    更多类似文章 >>
    生活服务
    热点新闻
    分享 收藏 导长图 关注 下载文章
    绑定账号成功
    后续可登录账号畅享VIP特权!
    如果VIP功能使用有故障,
    可点击这里联系客服!

    联系客服