是否有Delphi选项“锁定”表单的设计(布局)以防意外的变化? [英] Is there a Delphi option to 'lock' the design (layout) of a form against accidental changes?
问题描述
当然,您可以使用只读标志,而版本控制系统提供了另外的方法,可以看到发生了这样的修改。我真正喜欢的是一个{$ 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屋!