View Issue Details

IDProjectCategoryView StatusLast Update
0001858JEDI VCL00 JVCL Componentspublic2004-06-24 00:43
ReporteranonymousAssigned Touser72 
Status resolvedResolutionfixed 
Product Version 
Target VersionFixed in Version 
Summary0001858: ReadOnly property not working for TJvCheckBox in JVCL 3.0
DescriptionI can always check or uncheck the TJvCheckBox after setting the ReadOnly property to true. Is it not applicable to TJvCheckBox?
Additional InformationI am using Delphi 7 in Windows 2000.
TagsNo tags attached.



2004-06-14 02:50


If you change the Checked property in code, ReadOnly is automatically set to false and I can't see any way to fix that (setting ReadOnly to true again doesn't help)...


2004-06-14 18:37

viewer   ~0004557

Do you mean we couldn't use ReadOnly property if we changed the checked property in code? So the ReadOnly property is meaningless in this component?


2004-06-15 02:23


> So the ReadOnly property is meaningless in this component?
Seems so, at least when want to set Checked in code.

ReadOnly is really only a wrapper for the ancestors ClickDisabled property, implemented in VCL. It seems it was never supposed to be used this way. I have tried to coax ClickDisabled into working as it was intended but haven't been succesful yet. If you have any suggestions or solutions, now would be a good time :)


2004-06-22 08:03

viewer   ~0004597

> ReadOnly is really only a wrapper for the ancestors ClickDisabled property

In the original code (attached below) ReadOnly was implemented by overriding Toggle method. Worked OK... why was it changed?

  TJvCheckBox = class(TCheckBox)
    FReadOnly: Boolean;
    procedure SetReadOnly(const Value: Boolean);
    procedure BMSetCheck(var Msg: TMessage); message BM_SETCHECK;
    procedure Toggle; override;
    constructor Create(AOwner: TComponent); override;
    property ReadOnly: Boolean read FReadOnly write SetReadOnly default False; end;


constructor TJvCheckBox.Create(AOwner: TComponent);
  FReadOnly := False;

procedure TJvCheckBox.BMSetCheck(var Msg: TMessage);
  if(not ReadOnly)then inherited;

procedure TJvCheckBox.Toggle;
  if not(ReadOnly)then begin
     if Assigned(FAssociated) then
       FAssociated.Enabled := Checked;

procedure TJvCheckBox.SetReadOnly(const Value: Boolean);
  if FReadOnly <> Value then begin
     FReadOnly := Value;


2004-06-24 00:43


> Worked OK... why was it changed?
Dunno, but I've changed it back again.

Issue History

Date Modified Username Field Change
2004-06-14 01:31 anonymous New Issue
2004-06-14 02:50 user72 Note Added: 0004552
2004-06-14 18:37 anonymous Note Added: 0004557
2004-06-15 02:23 user72 Note Added: 0004559
2004-06-22 08:03 anonymous Note Added: 0004597
2004-06-24 00:43 user72 Status new => resolved
2004-06-24 00:43 user72 Resolution open => fixed
2004-06-24 00:43 user72 Assigned To => user72
2004-06-24 00:43 user72 Note Added: 0004606