Hi everyone,
I display some data in a propertygrid using different TypeConverters that I created. Those TypeConverters have different behaviors but they all support the Mouse wheel event to change the property.
If you scroll the mouse wheel, the selected property change as it should, no problem there. But if there are enough properties to generate a vertical scroll bar on the propertygrid, the property change as it should but the scroll bar also scroll, which makes it a little bit awkward for the user.
I tried intercepting all the MouseWheel events I could with no success... The propertygrid thinks the user wants to move the scrollbar with the MouseWheel.
I realized that if you override the function "GetStandardVal ues()" (and two other functions) in your new TypeConverter, everything works like a charm out of the box. What I mean is that the property iterates between the "standard values" without any modification and the scroll bar doesn't scroll. You don't even have to catch the MouseWheel event.
My question is... What's the difference between a TypeConverter that overrides "GetStandardVal ues()" and one that doesn't? How can I tell the propertygrid that the MouseWheel event is processed by my property? (Not overriding the function is equivalent to returning "new object[0]" in the function).
I hope you understand my question, it's kind of hard to summarize.
Thank you
I display some data in a propertygrid using different TypeConverters that I created. Those TypeConverters have different behaviors but they all support the Mouse wheel event to change the property.
If you scroll the mouse wheel, the selected property change as it should, no problem there. But if there are enough properties to generate a vertical scroll bar on the propertygrid, the property change as it should but the scroll bar also scroll, which makes it a little bit awkward for the user.
I tried intercepting all the MouseWheel events I could with no success... The propertygrid thinks the user wants to move the scrollbar with the MouseWheel.
I realized that if you override the function "GetStandardVal ues()" (and two other functions) in your new TypeConverter, everything works like a charm out of the box. What I mean is that the property iterates between the "standard values" without any modification and the scroll bar doesn't scroll. You don't even have to catch the MouseWheel event.
My question is... What's the difference between a TypeConverter that overrides "GetStandardVal ues()" and one that doesn't? How can I tell the propertygrid that the MouseWheel event is processed by my property? (Not overriding the function is equivalent to returning "new object[0]" in the function).
I hope you understand my question, it's kind of hard to summarize.
Thank you
Comment