我的环境:Windows 7专业版(32位),RadStudio XE4。
在上面的问答中,有一个回复说:“更具体地说,如果您使用Delphi IDE进行编程,则会发现发布的属性(-y+ies)将显示在对象检查器中。”
我尝试了一下。
unit Unit1;
interface
uses
Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics,
Vcl.Controls, Vcl.Forms, Vcl.Dialogs;
type
TForm1 = class(TForm)
private
FSampleProp1: Integer;
function GetSampleProp1(): Integer;
procedure SetSampleProp1(val: Integer);
{ Private declaration }
published
{ Private declaration }
property SampleProp1: Integer read GetSampleProp1 write SetSampleProp1;
end;
我原本期望在“属性”选项卡中的对象检视器中有“SampleProp1”。但是我没有找到它。
相反,在[Delphi类浏览器]窗口中找到了“SampleProp1”。
我应该在对象检视器中找到发布的属性吗?这是不正确的吗?