View Issue Details

IDProjectCategoryView StatusLast Update
0005657JEDI VCL00 JVCL Componentspublic2014-12-04 16:32
ReporterFBiehnAssigned Toobones 
PrioritynormalSeverityminorReproducibilityalways
Status acknowledgedResolutionreopened 
Product Version3.40 
Target VersionFixed in VersionDaily / GIT 
Summary0005657: JvIPAddress does not react like Windows Component while deactivating
DescriptionWhen you disable the JvIPAddress the color will not be changed, so the user does not see any different between status enable and disable.
I added a small procedure to fix this:

interface

private
procedure CMEnabledChanged(var Message: TMessage); message CM_ENABLEDCHANGED;

implementation

procedure TJvIPAddress.CMEnabledChanged(var Message: TMessage);
begin
  inherited;
  if not Self.Enabled then
  begin
    Self.Color := clBtnFace;
    Self.Font.Color := clBtnShadow;
  end
  else
  begin
    Self.Color := clWindow;
    Self.Font.Color := clWindowText;
  end;
end;

I also added a diff file
TagsNo tags attached.

Activities

2011-09-21 14:22

 

Diff.diff (437 bytes)
173a174
>     procedure CMEnabledChanged(var Message: TMessage); message CM_ENABLEDCHANGED;
1181a1183,1197
> end;
> 
> procedure TJvIPAddress.CMEnabledChanged(var Message: TMessage);
> begin
>   inherited;
>   if not Self.Enabled then
>   begin
>     Self.Color := clBtnFace;
>     Self.Font.Color := clBtnShadow;
>   end
>   else
>   begin
>     Self.Color := clWindow;
>     Self.Font.Color := clWindowText;
>   end;
Diff.diff (437 bytes)

obones

2011-09-21 14:48

administrator   ~0018961

Please provide the zipped sources of a sample application showing this

2011-09-21 14:52

 

TestProject.zip (2,593 bytes)

FBiehn

2011-09-21 14:52

reporter   ~0018964

Added a TestProject with a JvIPAdress and a button as enable/disable toggle

obones

2012-02-23 11:57

administrator   ~0019512

Under Windows 7, with the latest SVN content, I'm seeing a font change just like a TEdit does.

FBiehn

2012-02-23 15:04

reporter   ~0019518

Yes, a TEdit change only the font if you disable the control. The JvIPAdress control react the same way.
BUT the windows reaction for a ip edit is also changing the background color. You see this, if you activate dhcp in your network adapter settings ("Obtain an IP address automatically").

obones

2012-06-11 17:42

administrator   ~0019878

I'm not sure this is standard under latest versions of Windows

FBiehn

2012-06-12 08:13

reporter   ~0019888

It seems to be a standard under latest versions of Windows.
I tested it under Windows XP, Windows Server 2003, Windows Vista, Windows Server 2008, Windows 7, Windows 8 (Release Preview), Windows 2012 (Release Preview). All these OS react on the same way with edit controls ;-)

obones

2012-06-12 17:42

administrator   ~0019936

This is now in SVN

Arioch

2012-06-13 14:49

developer   ~0019955

Last edited: 2012-06-28 08:50

it basically means, that now properties like Color and Font.Color have no effect, despite being published and common for so many controls?

 property ParentColor and ParentFont are knocked out too, despite kept published ?

 and VCL Themes/Styles are not supported either ?

 That IMHO seems to be too radical change.

obones

2012-06-13 15:59

administrator   ~0019961

That's a good point, I'll have to review this.

Arioch

2012-08-13 21:47

developer   ~0020094

frankly, i remember when i 1st saw XP after long experience with win98/Win2000, that behavior of IP Address editor i considered to be a bug on Microsoft part :-)

I still fill that way...

obones

2013-12-13 11:35

administrator   ~0020793

so what do we do here?

Arioch

2013-12-13 12:22

developer   ~0020811

Personally i am about reverting this - it removes standard functionality of VCL edit control.

Or we should remove Font/Color/ParentFont/ParentColor properties if we decided to disable them.

And i don't know what to do with VCL themes.

I wonder how stock TEdit with custom Color and Font.Color reacts to change in .Enabled - maybe that logic should be borrowed from VCL sources into TJvIPEdit as well.

Issue History

Date Modified Username Field Change
2011-09-21 14:22 FBiehn New Issue
2011-09-21 14:22 FBiehn File Added: Diff.diff
2011-09-21 14:48 obones Note Added: 0018961
2011-09-21 14:48 obones Status new => feedback
2011-09-21 14:52 FBiehn File Added: TestProject.zip
2011-09-21 14:52 FBiehn Note Added: 0018964
2011-09-21 15:05 obones Status feedback => acknowledged
2012-02-23 11:57 obones Note Added: 0019512
2012-02-23 11:57 obones Status acknowledged => feedback
2012-02-23 15:04 FBiehn Note Added: 0019518
2012-06-11 17:42 obones Note Added: 0019878
2012-06-12 08:13 FBiehn Note Added: 0019888
2012-06-12 09:52 obones Status feedback => acknowledged
2012-06-12 17:42 obones Note Added: 0019936
2012-06-12 17:42 obones Status acknowledged => resolved
2012-06-12 17:42 obones Fixed in Version => Daily / SVN
2012-06-12 17:42 obones Resolution open => fixed
2012-06-12 17:42 obones Assigned To => obones
2012-06-13 14:49 Arioch Note Added: 0019955
2012-06-13 14:49 Arioch Status resolved => feedback
2012-06-13 14:49 Arioch Resolution fixed => reopened
2012-06-13 15:59 obones Note Added: 0019961
2012-06-28 08:50 Arioch Note Edited: 0019955
2012-08-13 21:47 Arioch Note Added: 0020094
2013-12-13 11:35 obones Note Added: 0020793
2013-12-13 12:22 Arioch Note Added: 0020811
2014-12-04 16:32 obones Status feedback => acknowledged