请问:右击f1book时出现工作簿设计器,可以直接在这里对工作簿进行编辑,这是怎么做到的呢?我也在控件中想实现这样的功能,要怎么做呢?
右击f1book时出现工作簿设计器,可以直接在这里对工作簿进行编辑,这是怎么做到的呢?我也在控件中想实现这样的功能,而且编辑后的结果要显示在控件中,要怎么做呢?请不吝赐教! 问题点数:50、回复次数:11Top
1 楼wweijie(可爱小果果)回复于 2003-09-01 17:30:37 得分 0
“工作簿设计器”是什么概念?Top
2 楼hunersh(dier)回复于 2003-09-01 19:20:01 得分 0
其实就是像fast report双击控件会出现报表设计器一样(——这是怎么做到的呢?)只是f1book是可视控件,所以编辑结果还要显示在控件中
能帮我看看吗?Top
3 楼frogshero(头疼)回复于 2003-09-01 19:28:16 得分 0
俺也想知道
Top
4 楼hunersh(dier)回复于 2003-09-02 09:10:29 得分 0
这个问题请帮帮忙!Top
5 楼hunersh(dier)回复于 2003-09-03 10:11:09 得分 0
没人回答,伤心~~~~~~~~Top
6 楼wweijie(可爱小果果)回复于 2003-09-03 10:30:55 得分 30
我研究了一下fastreport,发现它是在这里定义的,细节的东西还需要再研究
TfrRepEditor = class(TComponentEditor)
procedure ExecuteVerb(Index: Integer); override;
function GetVerb(Index: Integer): String; override;
function GetVerbCount: Integer; override;
end;
Top
7 楼wweijie(可爱小果果)回复于 2003-09-03 10:38:28 得分 0
TComponentEditor provides the default implementation for the IComponentEditor interface.
Unit
DesignEditors
Description
Use TComponentEditor or one of its descendants as a base class when defining a design-time editor for working with a new component class. Although you can create component editors that descend directly from TBaseComponentEditor, it is convenient to use TComponentEditor, because this classs supplies a default implementation of the IComonentEditor interface.
Create a new component editor class for a component class to add verbs to its context menu, change its default double-click behavior, or allow the component to use a new clipboard format.
Once the component editor is defined, it can be registered to work with a particular component class. A registered component editor is created for each component of that class when it is selected in the form designer. When the component is double-clicked, the Edit method of the component editor is called. When the user right-clicks the component, the GetVerbCount and GetVerb methods of the editor are called to build context menu. To create the association between a component editor and a component class, call RegisterComponentEditor.
Delphi provides a descendant of TComponentEditor (TDefaultEditor) which all components use if they have no registered association with a component editor.Top
8 楼hunersh(dier)回复于 2003-09-03 11:18:27 得分 0
谢谢你的回答——有点明白这个意思了
只是这个调用报表设计器的方法是怎样加入右击控件出现的菜单中的?
还有这个报表设计器是怎样调用的?
后面这个问题我还有一点想法,前面那个才刚有点概念,请再帮帮忙,多谢!
Top
9 楼hkbarton(→Beginner←)回复于 2003-09-03 13:57:25 得分 20
好象就是控件的控件编辑器吧,看看我些的那个连载文章的最后一骗中可能有你要的
http://www.csdn.net/develop/read_article.asp?id=20251
http://www.csdn.net/develop/read_article.asp?id=20252
http://www.csdn.net/develop/read_article.asp?id=20262
http://www.csdn.net/develop/read_article.asp?id=20263Top
10 楼wweijie(可爱小果果)回复于 2003-09-03 14:28:57 得分 0
function GetVerbCount: Integer; override;//定义了右键菜单中内容的数量
function GetVerb(Index: Integer): String; override;//定义了对应右键菜单中第index个(从0开始)的内容
你定义了上面两个函数,控键的右键菜单中会自动添加进去。
procedure ExecuteVerb(Index: Integer); override; //定义了对应菜单中响应的事件,在这里调用报表设计器,其实报表设计器也是一个类,设计窗体的显示是在报表设计器这个类中实现的
Top
11 楼hunersh(dier)回复于 2003-09-03 14:49:22 得分 0
非常感谢两位!
接下来我该自己试一试了,希望遇到问题的时候还能得到你们的帮助!
//bowTop



