View Issue Details

IDProjectCategoryView StatusLast Update
0005146JEDI VCL00 JVCL Componentspublic2012-02-29 16:53
ReportervacAssigned Toobones 
PrioritynormalSeveritymajorReproducibilityalways
Status resolvedResolutionfixed 
Product Version3.39 
Target VersionFixed in Version3.45 
Summary0005146: TJvTreeNode.SetChecked does not work when user changes node state
DescriptionIn additional information i have add my solution.

The example of this problem is:
First i do SelectAll procedure (listed below) - check all nodes in code.
Next, the user will disable some checkboxes and after that, if i execute my SelectAll procedure, checkboxes disabled by the user wont be checked.

procedure TForm1.SelectAllClick(Sender: TObject);
var
  I: integer;
begin
  for I := 0 to JvTreeView1.Items.Count - 1 do
    TJvTreeNode(JvTreeView1.Items[I]).Checked:=True;
end;
Additional InformationI think the problem is in procedure TJvTreeNode.SetChecked(Value: Boolean);
in first line: "if Value <> FChecked then"
FChecked is variable which is not refreshing on user actions.

Changing this line to: "if Value <> GetChecked then" solves the problem.
TagsNo tags attached.

Activities

obones

2010-03-08 16:14

administrator   ~0017254

Please provide the zipped sources of a sample application showing this

vac

2010-03-08 17:48

reporter   ~0017265

i have provided minimal example - first click "select all" button to check all nodes (all three nodes will be checked correctly). after that, click on any checkbox to uncheck it. finally, click "select all" button again (unchecked nodes won't be checked...)

2010-03-08 17:48

 

jedi_treenode.zip (1,457 bytes)

obones

2010-10-08 15:04

administrator   ~0017780

Thanks, this is now in SVN

Issue History

Date Modified Username Field Change
2010-02-01 15:29 vac New Issue
2010-03-08 16:14 obones Note Added: 0017254
2010-03-08 16:14 obones Status new => feedback
2010-03-08 17:48 vac Note Added: 0017265
2010-03-08 17:48 vac File Added: jedi_treenode.zip
2010-06-07 13:42 obones Status feedback => acknowledged
2010-10-08 15:04 obones Note Added: 0017780
2010-10-08 15:04 obones Status acknowledged => resolved
2010-10-08 15:04 obones Fixed in Version => Daily / SVN
2010-10-08 15:04 obones Resolution open => fixed
2010-10-08 15:04 obones Assigned To => obones
2012-02-29 16:53 obones Fixed in Version Daily / SVN => 3.45