From: <ob...@us...> - 2012-06-12 15:43:08
|
Revision: 13333 http://jvcl.svn.sourceforge.net/jvcl/?rev=13333&view=rev Author: obones Date: 2012-06-12 15:42:57 +0000 (Tue, 12 Jun 2012) Log Message: ----------- Mantis 5657: Now shows the disabled state with colors Modified Paths: -------------- trunk/jvcl/run/JvComCtrls.pas Modified: trunk/jvcl/run/JvComCtrls.pas =================================================================== --- trunk/jvcl/run/JvComCtrls.pas 2012-06-12 15:22:24 UTC (rev 13332) +++ trunk/jvcl/run/JvComCtrls.pas 2012-06-12 15:42:57 UTC (rev 13333) @@ -1,4 +1,4 @@ -{----------------------------------------------------------------------------- +{----------------------------------------------------------------------------- The contents of this file are subject to the Mozilla Public License Version 1.1 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at @@ -198,6 +198,7 @@ procedure SetAddress(const Value: LongWord); procedure SetAddressValues(const Value: TJvIPAddressValues); procedure CNCommand(var Msg: TWMCommand); message CN_COMMAND; + procedure CMEnabledChanged(var Message: TMessage); message CM_ENABLEDCHANGED; procedure CNNotify(var Msg: TWMNotify); message CN_NOTIFY; procedure WMDestroy(var Msg: TWMNCDestroy); message WM_DESTROY; procedure WMParentNotify(var Msg: TWMParentNotify); message WM_PARENTNOTIFY; @@ -1227,6 +1228,22 @@ FEditControlCount := 0; end; +procedure TJvIPAddress.CMEnabledChanged(var Message: TMessage); +begin + inherited; + + if not Enabled then + begin + Color := clBtnFace; + Font.Color := clBtnShadow; + end + else + begin + Color := clWindow; + Font.Color := clWindowText; + end; +end; + procedure TJvIPAddress.ColorChanged; begin inherited ColorChanged; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |