Delphi TControl 类(ClientWidth和Width区别)(SetEditMode控件是否可见)

本文介绍了Delphi中TControl的ClientWidth与Width属性的区别,当控件BorderStyle为bsNone且无竖向滚动条时两者相等。同时,展示了SetEditMode函数的使用,该函数可以便捷地批量设置控件的Visible属性,避免重复代码,提高代码效率。
摘要由CSDN通过智能技术生成
1. TControl.ClientWidth与TControl.Width区别
TControl.Width := TControl.ClientWidth + borderWidth + ScrollbarWidth(竖着的哪个);

如果一个控件的BorderStyle := bsNone(即BorderWidth:=0) 且 ScrollBars 没有竖着的哪个滚动条哪么 TControl.ClientWidth与TControl.Width相等

 

2.在很多時候設計界面的時候,部分控件需要顯示隱藏,或者需要反復設置它們的Enabel屬性.

procedure TFormClass.SetEditMode(Edits: array of Tcontrol; Flag: Boolean);
var i : integer;
begin
   for i := Low(Edits) to High(Edits) do
     Edits[i].Visible := Flag;//此為設置Visible屬性,也可以設置Enable屬性
end;

調用:

Our dOPC Client Toolkit for Delphi is probably one of the most used OPC component collections for Delphi worldwide. In addition, there are a number of good reasons why you should purchase our OPC Framework: dOPC main features: works with Delphi 6, 7, 2005, 2006, 2007, 2009, 2010, XE, XE2, XE3, XE4, XE5, XE6 works with Lazarus (http://www.lazarus.freepascal.org) quick and easy development of OPC DA, XML DA, HDA and AE clients 100% VCL / FCL Library & FireMonkey Framework compatible 100% written in Object Pascal delivered with full source code more than 30 example programs with full source code beside the OPC core components no additional DLL or ActiveX controls needed comprehensive help file, for online versionclick here rapid application deployment Unicode support (RAD Studio 2009 or newer) fast GUI development (no source code required) multiple and remote OPC server connections supported creation of 32 and 64 bit OPC high performance clients no runtime fees, royalty-free runtime distribution no limit on the number of applications developed designed for: Windows 8,7, Vista, XP, 2K, NT, 98, Me creation of OPC XML DA clients for Android, Mac OS (OS X) and iPhone (iOS) (XE5 or higher) OPC Specifications supported by dOPC: OPC Data Access DA 1.x, 2.x and 3.x OPC XML Data Access XML DA 1.x OPC Alarm & Events AE 1.x OPC Historical Data Access HDA 1.x (on request only for registered users) Pascal IDE's supported by dOPC: Embarcadero Delphi and RAD Studio XE2, XE3, XE4, XE5 and XE6 (Windows 32 and 64 bit) Lazarus (ver 1.0.10) with Free Pascal (FPC 2.6.2) or higher (Windows 32 and 64 Bit) Embarcadero Delphi and RAD Studio 2010, XE CodeGear Delphi and RAD Studio 2009 CodeGear Delphi and RAD Studio 2007 (only Delphi Win32) Borland Delphi 6,7, 2005 and 2006 Turbo Delphi 2006 Our powerful dOPC Toolkit allows you to build OPC client applications with just a few mouse clicks. E.g. dOPC includes a GUI component that allows you to bind OPC item values directly to properties of visual components, such as labels or edit boxes. If you want to create high-end OPC client applications in a fast and professional way with the highest performance, then our dOPC Client Toolkit is the right solution for you! We encourage you to download our free trial version, which is fully functional and includes a comprehensive help file and over 30 demo and example programs (with source code).
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值