是否有Delphi选项“锁定”表单的设计(布局)以防意外的变化? [英] Is there a Delphi option to 'lock' the design (layout) of a form against accidental changes?

查看:164
本文介绍了是否有Delphi选项“锁定”表单的设计(布局)以防意外的变化?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

经过多年的Delphi开发,我现在有数百种形式在我们的应用程序中共享。编译范围从Delphi 7到XE,因此可以在任何IDE中打开一个窗体。 Delphi 7之后的众所周知的Explicitxxx属性增加了解决方案,以避免意外获取早期编译器无法处理的属性的形式(例如安德烈亚斯的DDevExtensions ),但我想要一个更积极的开关,阻止Delphi完成或保存任何表单修改。期间。



当然,您可以使用只读标志,而版本控制系统提供了另外的方法,可以看到发生了这样的修改。我真正喜欢的是一个{$ LockDFM}开关,我可以放在窗体的单位,或一个上下文菜单选项查看窗体布局。



可以任何人想到一个整洁的方式实现这一点?



谢谢

解决方案

我可以想到的唯一的事情(除了您提到的只读/ VCS选项之外)是编辑菜单的锁定控件选项。这将设置一个防止控件移动的标志。我不知道它会做多少好,因为我从来没有尝试过;我只知道它在那里。


After years of Delphi development I now have hundreds of forms shared throughout our Applications. Compilation ranges from Delphi 7 through to XE, thus one form might be opened in any IDE. The well-known Explicitxxx property addition after Delphi 7 has solutions to avoid a form accidentally acquiring properties that earlier compilers can't process (e.g Andreas's DDevExtensions) but I'd like a more positive 'switch' that prevented Delphi from making or saving any form modifications at all. Period.

Of course you could use the read-only flag, and a version control system provides additional means particulay of seeing that such a modification has occured. What I'd really like though is a {$LockDFM} switch that I could put in the form's unit, or a context menu option when viewing the form layout.

Can anyone think of a neat way of achieving this?

Thanks

解决方案

The only thing I can think of (other than the read-only/VCS options you mentioned) is the Edit menu's Lock Controls option. This sets a flag that prevents controls from being moved around. I'm not sure how much good it would actually do, as I've never tried it; I just know it's there.

这篇关于是否有Delphi选项“锁定”表单的设计(布局)以防意外的变化?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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