Delphi ListView Fast Operation General Realization design article

Source: Internet
Author: User

As we all know, Delphi ListView class Direct Add, Update, delete operation speed is relatively slow, especially when the amount of data, such as the amount of data reached 5000, 10000, 50000, speed is really can be said to be "surprisingly slow." In fact, the rapid operation of the method is very simple, as we all know. In my work, many projects are used to ListView, and the response to speed is higher, so there has been a rapid operation ListView code scattered in a number of projects in many modules of the problem, and, when the interface layer data display requirements change, the natural occurrence of "repetitive code common problems." Considering compatibility issues with previous versions, there has been no mature component referencing third parties. In view of the fact that "repetitive code in a program is the easiest to cause problems and must be eliminated", you have designed a more general class structure for solving such problems. Of course, it's far from a "generic framework" (a lot of people on the market now like to make what they do, whatever it is, as a framework). In the project of adopting this structure, it is easy to implement the MVC pattern to achieve the low-level and basic requirements of the separation between business logic and interface display.

(because, the current CSDN software upload function is not available, I only put part of the code snippets in the document, there is a need for complete source, please leave a message)

Class Hierarchy:

The ListView base operation is encapsulated in the Lvcontroler package, and the core class is Tcxxlvcontroler:

(Note: The Lvcontroler class is encapsulated in a generic class structure, external users do not need to understand and access, so do not introduce.) )

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.