View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0001858 | JEDI VCL | 00 JVCL Components | public | 2004-06-14 01:31 | 2004-06-24 00:43 |
Reporter | anonymous | Assigned To | user72 | ||
Priority | normal | Severity | minor | Reproducibility | always |
Status | resolved | Resolution | fixed | ||
Product Version | |||||
Target Version | Fixed in Version | ||||
Summary | 0001858: ReadOnly property not working for TJvCheckBox in JVCL 3.0 | ||||
Description | I can always check or uncheck the TJvCheckBox after setting the ReadOnly property to true. Is it not applicable to TJvCheckBox? | ||||
Additional Information | I am using Delphi 7 in Windows 2000. | ||||
Tags | No tags attached. | ||||
|
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)... |
|
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? |
|
> 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 :) |
|
> 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) private FReadOnly: Boolean; procedure SetReadOnly(const Value: Boolean); procedure BMSetCheck(var Msg: TMessage); message BM_SETCHECK; public procedure Toggle; override; constructor Create(AOwner: TComponent); override; published property ReadOnly: Boolean read FReadOnly write SetReadOnly default False; end; implementation constructor TJvCheckBox.Create(AOwner: TComponent); begin inherited; FReadOnly := False; ... end; procedure TJvCheckBox.BMSetCheck(var Msg: TMessage); begin if(not ReadOnly)then inherited; Invalidate; end; procedure TJvCheckBox.Toggle; begin if not(ReadOnly)then begin inherited; FAutoSave.SaveValue(Checked); if Assigned(FAssociated) then FAssociated.Enabled := Checked; end; end; procedure TJvCheckBox.SetReadOnly(const Value: Boolean); begin if FReadOnly <> Value then begin FReadOnly := Value; end; end; |
|
> Worked OK... why was it changed? Dunno, but I've changed it back again. |
Date Modified | Username | Field | Change |
---|---|---|---|
2004-06-14 01:31 | anonymous | New Issue | |
2004-06-14 02:50 |
|
Note Added: 0004552 | |
2004-06-14 18:37 | anonymous | Note Added: 0004557 | |
2004-06-15 02:23 |
|
Note Added: 0004559 | |
2004-06-22 08:03 | anonymous | Note Added: 0004597 | |
2004-06-24 00:43 |
|
Status | new => resolved |
2004-06-24 00:43 |
|
Resolution | open => fixed |
2004-06-24 00:43 |
|
Assigned To | => user72 |
2004-06-24 00:43 |
|
Note Added: 0004606 |