View Issue Details

IDProjectCategoryView StatusLast Update
0005116JEDI VCL00 JVCL Componentspublic2010-10-08 14:52
ReporterdffAssigned Toobones 
PrioritynormalSeveritymajorReproducibilityalways
Status resolvedResolutionnot fixable 
Product Version3.35 
Target VersionFixed in Version 
Summary0005116: TJvCheckTreeView.OnToggling - AllowChange parameter
DescriptionRegardless of value assigned to the AllowChange parameter in TJvCheckTreeView.OnToggling check box's state is always changed after clicking. I suppose that the state should remain unchanged if the value was false (like in example below).

I have tried with up-to-date snapshot http://jvcl.sf.net/daily/, it's the same.

Example:

procedure TFrmMain.JvCheckTreeViewOnToggling(Sender: TObject; Node: TTreeNode; var AllowChange: Boolean);
begin
  AllowChange := false;
end;
TagsNo tags attached.

Activities

dff

2010-01-19 12:51

reporter   ~0017138

I've tracked this issue more carefully: when AllowChange is set to false, the state of check box remains unchanged and OnNodeCheckedChange event isn't fired, but the visual representation of check box changes as if its state has. This is very misleading - the look of component doesn't match its state.

obones

2010-03-08 15:23

administrator   ~0017238

Please provide the zipped sources of a sample application showing this

vandrovnik

2010-03-22 16:07

reporter   ~0017316

I have the same problem - I have used:
procedure TForm1.JvCheckTreeView1Toggling(Sender: TObject; Node: TTreeNode;
  var AllowChange: Boolean);
 begin
 AllowChange:=false;
end;

procedure TForm1.JvCheckTreeView1Changing(Sender: TObject; Node: TTreeNode;
  var AllowChange: Boolean);
  begin
  AllowChange:=false;
end;

But user still can check/uncheck check boxes.
I will attach an example.

2010-03-22 16:08

 

CheckTreeViewError.zip (380,768 bytes)

obones

2010-10-08 14:47

administrator   ~0017769

OnChanging is for preventing changing the active node, it has nothing to do with the check/uncheck state change

obones

2010-10-08 14:52

administrator   ~0017770

For this to work, you must use the cbsJVCL style AND a state image image list.
If you don't, the checkbox state is managed by the operating system and we have no control over it.

Issue History

Date Modified Username Field Change
2010-01-19 12:23 dff New Issue
2010-01-19 12:51 dff Note Added: 0017138
2010-03-08 15:23 obones Note Added: 0017238
2010-03-08 15:23 obones Status new => feedback
2010-03-22 16:07 vandrovnik Note Added: 0017316
2010-03-22 16:08 vandrovnik File Added: CheckTreeViewError.zip
2010-10-08 14:47 obones Note Added: 0017769
2010-10-08 14:52 obones Note Added: 0017770
2010-10-08 14:52 obones Status feedback => resolved
2010-10-08 14:52 obones Resolution open => not fixable
2010-10-08 14:52 obones Assigned To => obones