Delphi批注 [英] Delphi annotations

查看:85
本文介绍了Delphi批注的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在查看TCustomComboBoxEx对象的实现,因为我需要在delphi中创建一个自定义组合框,而我正试图获得所需的东西,而突然间我碰到了这段代码:

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
...

该程序名是什么?

类似的代码在delphi 2007中起作用(我的代码需要保持与该版本的兼容性)

Code like that work in delphi 2007 (my code needs to keep compatibility with that version)

推荐答案

这些都是属性。它们已添加到标准VCL控件中,以支持VCL.NET(BTW不再存在)。现在,Delphi 2010及更高版本支持属性。

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.

您可以在Delphi文档维基

You can read more in the Delphi documentation wiki

这篇关于Delphi批注的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆