own CMFCPropertyGridProperty::FormatValue messes up combobox of property

  • Thread starter Thread starter _Kornel_
  • Start date Start date
K

_Kornel_

Guest
Hi Everyone,

IÄm using the CMFCPropertyGridCtrl with some derived CMFCPropertyGridProperty classes for displaying int values, double values, checkboxes, buttons etc. So far so good.

I now tried to override the CMFCPropertyGridProperty::FormatValue method in order to add SiUnit symbols to my double value properties. So that instead of just displaying "230.0" I can display "230.0 V". That also works if I just want to display a static value. It all crumbles when I start adding (value-)options to my property by using the "AddOption" method. Tha problem arises when I click on the value of my property to start the edit process.

Normally (without my override) the property just works fine. With my override I click on the value and the displayed string vanishes, the value part of the property is cleared and the up-/down-arrow keys have no effect, Upon leaving the property no possible value from my options is displayed apart from my intended suffix. So as a result I just get a " V".

Can anyone point me in the right direction please? I already tried overriding several other methods like Get-/SetValue, OnCreateCombo, OnEdit, OnClickValue to no avail.

Thanks in advance,

Kornel

Continue reading...
 
Back
Top