TO 邓娟,
这两天我会好好看看的,顺便学学面向对象。(学DELPHI这么久了,居然还没学过它的面向对象方面的东西,汗。。。)
昨天上DevExpress ExpressQuantumGrid的The Express Support Forum,里面有一个问题就是讲怎样利用QuantumGrids的灵活性加入新的属性到它的类中,还有三个例子,值得好好看看,文章如下:
题目:How to Utilize the QuantumGrids Flexibility to Implement a New Feature in a Derived Class
内容:When designing QuantumGrid 4 our developers have created a flexible object model. Although the grid structure maybe difficult to understand, since it consists of hundreds of classes, it allows you to implement anything you need by creating descendants of particular grid classes. If you feel familiar with component writing, you can take the ability to customize QuantumGrid 4 to the next level.
The sample projects of this article demonstrate how you can implement additional features for the grid's TableView. Despite of the fact that some of these features may be built-in in a future grid version, our goal for publishing them here is to show you how easy implementing of an additional feature could be.
Currently the following samples are available. We will probably complete this article with more samples in the future.
* Implementing the RowHeight property in the table view.
* Drawing the "Click here to add a new record" message within the New Item row, similar to that how the Microsoft Outlook does this in the Tasks folder.
* Implementing hints for column headers.
As you may see, ViewInfo classes are inherited in all these samples. These classes are not yet described in the help. Moreover, descendants usually override protected methods, which are rarely described in documentation. Hopefully, most of you have the QuantumGrid source files as source code is the ultimate documentation. Studying a component from source is not just the only chance in case of the grid's ViewInfo classes; it may be the most efficient way to understand how an object works. In turn, source code availability helps you work out a solution and accomplish your tasks faster and with fewer efforts. If you purchased the product without the source code, you can upgrade to the suite with the source code by contacting our Sales dept. at sales@devexpress.com.
不介意看E文吧?