开发者

Delphi annotations

I was looking at the implementation of the TCustomComboBoxEx object since I need to create a custom combo box in delphi and I was triying to get what I needed, when suddenly I came over this piece of code:

...
[UIPermission(SecurityAction.LinkDemand, Window=UIPermissionWindow.AllWindows)]
procedure TCustomComboBoxEx.CreateWnd;
var
  ChildHandle: THandle;
  I: Integer;
  StrEnum: IEnumString;
  EditHandle: THandle;
begin
...

What is that upon the procedure name? What is its purpose?

Code开发者_开发知识库 like that work in delphi 2007 (my code needs to keep compatibility with that version)


Those are attributes. They were added to the standard VCL controls for support of the VCL.NET (which no longer exists, BTW). Attributes are supported now with Delphi 2010 and up.

You can read more in the Delphi documentation wiki

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜