CSDN首页 空间 新闻 论坛 Blog 下载 读书 网摘 搜索 .NET Java 视频 接项目 求职 在线学习 买书 程序员 通知
英特尔®游戏设计大赛100美元现金周周送 专题改版:Java Web 专题
CSDN社区
搜索 收藏 打印 关闭
CSDN社区 >  Delphi >  VCL组件开发及应用

请问:右击f1book时出现工作簿设计器,可以直接在这里对工作簿进行编辑,这是怎么做到的呢?我也在控件中想实现这样的功能,要怎么做呢?

楼主hunersh(dier)2003-09-01 16:49:01 在 Delphi / VCL组件开发及应用 提问

右击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

相关问题

  • 请问,有没有类似EXCEL中工作簿的控件?就是一个工作簿中包含好多工作表?
  • 活动工作簿问题(Actived Book)!!!!!!!!!!!!!!!!!!
  • 共享和保存Excel97-Excel2003 & 5.0/95工作簿
  • 如何做到 带 CheckBox 的 TreeView 控件?
  • TQuery或TTable如何访问Execl工作簿
  • 怎样在Excel中添加一个工作簿??谢谢
  • 急!急!急!如何众excel工作簿中提取数据
  • excel如何引用一个其它工作簿中的文件?
  • 请问如何在EXCEL里给工作簿加密码?
  • “本工作簿不能再使用其他新字体”?

关键词

  • .net
  • 控件
  • 报表
  • component
  • article
  • csdn
  • develop
  • asp
  • 工作簿
  • tcomponenteditor

得分解答快速导航

  • 帖主:hunersh
  • wweijie
  • hkbarton

相关链接

  • Delphi类图书
  • Delphi类源码下载
  • Delphi控件下载

广告也精彩

反馈

请通过下述方式给我们反馈
反馈
网站简介|广告服务|VIP资费标准|银行汇款帐号|网站地图|帮助|联系方式|诚聘英才|English|问题报告
世纪乐知(北京)网络技术有限公司 版权所有, 京 ICP 证 020026 号
北京创新乐知广告有限公司 提供技术支持
Copyright © 2000-2007, CSDN.NET, All Rights Reserved
GongshangLogo