0

I have few custom controls which show static text. These controls use to show zeros(0) in wx 2.8 version , now the same controls are showing some junk values when the application is launch and before its initialization. All these values in text control and filled dynamically based on user action.

How do I make it show default values like 0.0 or something in latest wxwidgets?

StraightCirle
  • 182
  • 2
  • 12

1 Answers1

0

Set the value of the text control when you invoke the constructor

new wxStaticText( this, -1, "0.0" );

For details of how and where to do this in your custom control, you will have to post your code : specifically the contructor code.

ravenspoint
  • 19,093
  • 6
  • 57
  • 103
  • After further looking into my code,It shows the my custom control is derived from wxtextctrl, Though i pass wxT(" ") for value parameter in constructor it generates junk values. This was not the case in widgets 2.8 and its a unicode build – StraightCirle Apr 14 '16 at 05:17
  • adding "0.0" in the constructor still gives junk values – StraightCirle Apr 14 '16 at 05:25
  • @StraightCirle, also you can safely get rid of wxT(). This was needed in 2.8 where we had ANSI/UNICODE builds, but not needed anymore. – Igor Apr 15 '16 at 13:54