有谁熟悉TFlowChart的?如何给里面的图形加上hint?

IOsetting 2003-10-04 12:04:17
谁用过TFlowChart?
里面一个类是这样定义的:
TdxFcItem = class(TPersistent)
private
FOwner: TdxCustomFlowChart;
FText: String;
FFont: TFont;
FRealFont: TFont;
FParentFont: Boolean;
FDestroying: Boolean;
FSelected: Boolean;
FRepainted: Boolean;
procedure OnFontChange(Sender: TObject);
procedure SetRealFont;
procedure SetFont(Value: TFont);
procedure SetParentFont(Value: Boolean);
procedure SetSelected(Value: Boolean);
protected
function SelList: TList; virtual; abstract;
procedure Changed;
procedure FontChanged; virtual;
procedure Invalidate; virtual; abstract;
procedure LoadFont(Stream: TStream);
procedure SaveFont(Stream: TStream);
procedure SetText(Value: String); virtual; abstract;
procedure ScaleFont;
property RealFont: TFont read FRealFont;
public
constructor Create(AOwner: TdxCustomFlowChart);
destructor Destroy; override;
procedure Assign(Source: TPersistent); override;
property Destroying: Boolean read FDestroying;
property Font: TFont read FFont write SetFont;
property Owner: TdxCustomFlowChart read FOwner;
property ParentFont: Boolean read FParentFont write SetParentFont;
property Selected: Boolean read FSelected write SetSelected;
property Text: String read FText write SetText;
end;

然后TdxFcObject从这个类继承,添加上paint方法。
我想让这个类能实现hint的功能,也就是和Label, button这些都有的那种hint, showhint属性
我改怎样做呢?我试过CM_MouseEnter和CM_MOUSELEAVE,但是没有反应,我也不好把
TPersistent类改成TCustomControl,那样procedure Assign(Source: TPersistent); override;我就不知道怎么改了
...全文
134 3 打赏 收藏 转发到动态 举报
写回复
用AI写文章
3 条回复
切换为时间正序
请发表友善的回复…
发表回复
huojiehai 2003-10-04
  • 打赏
  • 举报
回复
在这个类TdxFcItem中做肯定做不到的,你定义hint属性是可以的,但显示还是要在TFlowChart中控制的,很明示TdxFcItem中没有DC, 只有TFlowChart中才有DC
IOsetting 2003-10-04
  • 打赏
  • 举报
回复
一定要从有DC的类中继承吗?
能不能在TdxFcItem中加入一个可以接收消息的对象呢?
huojiehai 2003-10-04
  • 打赏
  • 举报
回复
只有从TControl继承下来的才能接收消息

1,183

社区成员

发帖
与我相关
我的任务
社区描述
Delphi GAME,图形处理/多媒体
社区管理员
  • GAME,图形处理/多媒体社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧