View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0004393 | JEDI VCL | 00 JVCL Components | public | 2008-07-04 13:44 | 2008-12-30 03:22 |
Reporter | tetardd | Assigned To | obones | ||
Priority | normal | Severity | major | Reproducibility | always |
Status | resolved | Resolution | fixed | ||
Product Version | 3.32 | ||||
Target Version | Fixed in Version | 3.36 | |||
Summary | 0004393: Setting the Selected property of TJvTreeView does not trigger the OnSelectionChange event | ||||
Description | 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. | ||||
|
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. |
|
Hi, 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? |
2008-11-05 13:25
|
TJvTreeView Bug 2.zip (8,230 bytes) |
|
This is now in SVN |
Date Modified | Username | Field | Change |
---|---|---|---|
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 |