The text box control, whatever it is, is not designed for presenting anything but plain text.
You may choose to use only the notation traditional for high-level programming language, to write expressions in the plain text form (example: "
sqrt(sin(x))
"). If you want require your customer to be able to learn and use such notation, it can be fine, but if you assume that the customer does not have to be comfortable with programming style of writing but is familiar with traditional mathematical notations as they are presented in books, you will need to solve much more difficult problem.
One step forward would be using simplified notation with added subscript/superscript expressions not not all those integrals, horizontal-line division notation, radical signs, etc., you can use HTML. Then, you have two ways to represent them:
WebBrowser
control (I'm not giving you the full type name because you did not specify the UI library you want to use) or some structured-text control, such as
RichTextBox
(in WPF, there are more options). The input of such data is the separate problem, pretty difficult, but just for presentation, I could advice wonderful HTML-based controls presented in these CodeProject articles:
A Professional HTML Renderer You Will Use[
^],
WPF HTML Supported TextBlock[
^].
A full-fledged option would be the support of MathML. See also how the problem of embedding of MathML looks like:
http://en.wikipedia.org/wiki/MathML[
^].
Using it would be even more difficult problem, even for just presentation. One option would be using MathML directly embedded in HTML, but this is a feature of HTML5 not yet supported by all browsers. Importantly, at the moment of writing, to best of my knowledge, it is not supported by IE which control will actually be used it you use the
WebBrowser
control provided in the GAC as a part of .NET FCL (Framework Class Library,
http://en.wikipedia.org/wiki/Framework_Class_Library[
^]). Hence, you would probably need to use some third-party library for .NET, such as Mozilla Gecko:
http://en.wikipedia.org/wiki/Gecko_%28layout_engine%29[
^].
Please see what's currently supported by major existing layout engines:
http://en.wikipedia.org/wiki/Comparison_of_layout_engines_%28HTML5%29[
^].
I don't even discuss how can you implement the input of the formulas. It will need serious design and development work, really costly in terms of working hours of really qualified developers.
Finally, you can develop your own custom control with your own rendering and input, based directly on the
Control
class (please see my note on the unknown UI library to be used). Think by yourself if it seems feasible or not.
—SA