Re: It's not too late to fix the cWebTreeView
Originally Posted by
Harm Wibier
There are a few things here.
First of all this pointed to a bug in the Df_Flat_... theme causing the icon to disappear when clicking the selected item again. That is a pure CSS change with a very low risk and this is introduced in 18.1 / 18.2 so that is something we will consider fixing that for 18.2.
Thanks Harm.
Then there is the OnSelect behavior. The OnSelect is designed to trigger when the selected item changes by user interaction. According to that specification it is actually triggering too often as it sometimes triggers when clicking the selected item. Analyzing the code learns that that actually seems to happen pretty much by accident. Fixing this would make it function according to the spec but most like won’t help you (it also wouldn’t meet the requirements for something to be fixed in this stage of 18.2).
You're right, as long as the selected item isn't being cleared the current behavior is better than the spec.
It seems that what you need an OnItemClick event that is triggered on every click. So that is a feature request for which certainly is too late in the 18.2 cycle.
I suppose that would overcome this problem but it would be better to fix the actual problem which I am sure is not to spec.
What I don’t understand here is why the item is selected when you open the dialog for a second time. By default (certainly in 18.2) the treeview won’t have a selected item. Do you have code that selects the item or are you setting pbOverrideStateOnShow on the dialog?
Nor do I understand why it comes up selected. It is almost as though the dialog is setting there in the background and is simply re-focused when opened a second time. I had pbOverrideStateOnShow set to false but setting it to true makes no difference. I was exiting the dialog by sending OK. I have now tried setting pbServerOnEscape to True and sending Cancel but no difference.
I'll do a bit more testing.
Ian
The most important leg on a three legged stool is the one that's missing.
Murphy's Law (2)