Search code examples
wxwidgets

wxWidget C++ wxString subscript


I want to print subscripts or superscripts using if possible wxString or another wxWidget tool since my project heavily relies on wxWidgets.

It looks like it is done using UNICODE but there are lots of codes and I could not find the way I want. In an HTML code I want to print for example vf. Here 'f' is a single character and maybe there is a unique code for it. However, I want to learn the general way, if there is one, such as what if it was a string such as vastring.

How can I do it?

Thanks in advance,


Solution

  • If you need to just display strings with sub/superscripts then the simplest solution probably is indeed to use wxHtmlWindow. If you also need to allow editing them, look at wxRichTextCtrl. You can't do it in general with just wxStaticText, although Unicode does have a few sub/superscript symbols, they're not exhaustive.