I want to create a non-editable text box with no cursor in wxPython. I want it to get updated in real time depending on the values from the wxSlider.
The box will basically have a quadratic equation whose coefficients should change depending on the value of the slider.
For example , what I want is very similar to this functionality in LabView -
Whenever you change the coefficients in the Numerator and Denominator spin control (instead of spin control I will have a slider) it automatically changes in the transfer function textbox.
So what I want to know is:
UPDATE: You made it clear that you want to render a formula, sort of. If you only use the inverted quadratic equation you could hack together some "ASCII art". But you will probably want to have something to render math text. As your program involves plots also you may want to incorporate matplotlib. In that case you can use its functionality to render math text (it uses a subset of LaTeX syntax which is builtin without actually requiring TeX). See this example on the mpl site, especially the MathTextParser
. And you would use a wx.StaticBitmap
to display the math text.
What you are searching for should be the wx.StaticText
. You would update it with SetLabel()
(method common to ancestor wx.Control
).