关于TStatusBar.OnPanelClick的问题(100分)

  • 主题发起人 主题发起人 Elephas
  • 开始时间 开始时间
E

Elephas

Unregistered / Unconfirmed
GUEST, unregistred user!
Delphi6帮助中关于TStatusBar有OnPanelClick这一属性,其说明如下:
TStatusBar.OnPanelClick
Respond to click on panel.

TPanelClick = procedure(Sender: TObject; Panel: TStatusPanel) of object;
property OnPanelClick: TPanelClick;

Description
OnPanelClick occurs when the use clicks the mouse on the control, except for clicks on the control border or the panel separators. Panel refers to the panel clicked.
OnPanelClick occurs even if SimpleText is True.
可实际编译中显示OnPanelClick未定义,这是为什么?我想跟踪是哪一个子状态栏产生鼠标单击事件,就此向各位大侠请教.
 
有没有在tform1的声明中声明这个过程呀
 
如下所示没有问题
unit Unit1;

interface

uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, ComCtrls, Menus, ImgList, ToolWin, FMTBcd, DB, SqlExpr, Grids,
DBGrids;

type
TForm1 = class(TForm)
StatusBar1: TStatusBar;
procedure StatusBar1PanelClick(Sender: TObject; Panel: TStatusPanel);
private
{ Private declarations }
public
{ Public declarations }
end;

var
Form1: TForm1;
implementation

uses Unit2;

{$R *.dfm}
procedure TForm1.StatusBar1PanelClick(Sender: TObject; Panel: TStatusPanel);
begin
//.............
end;
end.
 

Similar threads

S
回复
0
查看
3K
SUNSTONE的Delphi笔记
S
S
回复
0
查看
2K
SUNSTONE的Delphi笔记
S
I
回复
0
查看
3K
import
I
I
回复
0
查看
1K
import
I
I
回复
0
查看
3K
import
I
后退
顶部