|Anonymous | Login | Signup for a new account||2019-05-19 23:33 CEST|
|Main | My View | View Issues | Change Log | Roadmap | Docs|
|Viewing Issue Simple Details|
|ID||Category||Severity||Reproducibility||Date Submitted||Last Update|
|0004393||[JEDI VCL] 00 JVCL Components||major||always||2008-07-04 13:44||2008-12-30 03:22|
|Summary||0004393: Setting the Selected property of TJvTreeView does not trigger the OnSelectionChange event|
If you set in code the Selected property to select a tree node, the OnSelectionChange event is not triggered.
Looking at the code, it seems that DoSelectionChange in not called in procedure CNNotify() in the TVN_SELCHANGEDA, TVN_SELCHANGEDW block of code.
|Tags||No tags attached.|
|Attached Files||TJvTreeView Bug 2.zip [^] (8,230 bytes) 2008-11-05 13:25|
Please use the very latest version of the JVCL
Then, if the bug is still there, please provide the zipped sources of a sample application showing this.
I checked the code for version 3.33 and 3.32 of TJvTreeView and there is no chnages in the code so the bug has not been fixed.
I fixed it myself by modification on the code below:
Procedure TJvTreeView.CNNotify(var Msg: TWMNotify);
TVN_SELCHANGEDA, TVN_SELCHANGEDW: Begin
DoSelectionChange; // <- Corrects the OnSelectionChanged bug.
if Assigned(FPageControl) then
if Selected <> nil then
I also include a zip file of the application demonstrating the bug (and incidentally also the one in issue 004403):
Run the app (Project5.exe).
1- Select one tree view
2- Click the 'Change Selection in Code' button.
As expected, the label showing the selected item is correct and the memo that displayed triggered event is OK too.
Note that the selected item hasn't got its background drawn even if HideSelection is False (issue 004403).
3- Click again the 'Change Selection in Code' button.
No OnSelectionChange event has been triggered (as shown by memo lines).
4- Click the 'Add item and seelct it'.
A new item is added and selected and once again, no OnSelectionChanged is triggered.
I include an exe with my own fix (Project5 - Fixed.exe). Now, the events are properly triggered but some are done several times in a row so it is not a brilliant fixc.
|Having problems uploading demo of bug.|
|Don't include the exe, we only want sources. With the exe, the zip file is too big anyway|
|Hello, any news?|
|This is now in SVN|
|2008-07-04 13:44||tetardd||New Issue|
|2008-07-15 00:55||obones||Note Added: 0014374|
|2008-07-15 00:55||obones||Status||new => feedback|
|2008-07-17 02:08||tetardd||Note Added: 0014395|
|2008-07-17 02:11||tetardd||Note Added: 0014396|
|2008-07-17 02:34||obones||Note Added: 0014397|
|2008-10-10 05:17||obones||Note Added: 0014826|
|2008-11-05 13:25||tetardd||File Added: TJvTreeView Bug 2.zip|
|2008-12-30 03:22||obones||Note Added: 0015198|
|2008-12-30 03:22||obones||Status||feedback => resolved|
|2008-12-30 03:22||obones||Fixed in Version||=> Daily / SVN|
|2008-12-30 03:22||obones||Resolution||open => fixed|
|2008-12-30 03:22||obones||Assigned To||=> obones|
|Mantis 1.1.6[^] Copyright © 2000 - 2008 Mantis Group|