Main Site Documentation

° degree in text of textbox



how can I show ° (degree) in the textbox. I want to show it as text.
I solved this issue when I used display.simplegraphics.displaytext with holding Alt-key and then pressing 0176 or used the tiny tool. But what now?



Could you provide a minimal example of your code for glide that will only show where you have an issue so we can test it as well.


In my window I have this textbox:

Now I want to replace “Test” by the temperature that my sensor delivers and show it with °C.
I use the method of the sensor module, that measure continously every few seconds (but that’s not important here). I try to update the value in the textbox.

temp String;
temp = temperature.ToString(); //temperature is double from the sensor

GHIElectronics.NETMF.Glide.UI.TextBox TempAnzeige = (GHIElectronics.NETMF.Glide.UI.TextBox)window.GetChildByName(“TempAnzeige”);
TempAnzeige.Text = temp + “°C”;

The code works but the ° is shown as a rectangle.


You need to regenerate the font you are using with that textbox to include ° symbol


and how can I do this?


Can I add the generated fonts in the xml-file??

There is only Font=“8”


Take a look at the Glide source code

It has 10 fonts of different sizes that you can use. I think Font=“8” corresponds to droid_reg08.tinyfnt

If you replace that file with your generated font file of size 8 that has the ° symbol and recompile glide you should be able to see it in your application.


To be sure I generated the font again including °. Then I replaced the file droid_reg08.tinyfnt in Glide – Resources by the generated file without changing the name.
When I select in widow text file in VS 8 as font (so nothing changed), I still get the rectangle. I created a new project to be sure that the right dll is imported.


Double check if your Tinyfont converter has the checkboxes… well, checked :slight_smile:

I’ve used degree symbol before, so it definitely has to work.


I did it how you show on the screenshot in the other post. The problem was to say in the window file in Visual Studio which font he should use. Window file: What means Font=“8”? Resources in the fodler are attached. I replaced droid_reg08.tinyfnt by the generated font but that didn’t work. I solved the issue with this code: GHIElectronics.NETMF.Glide.UI.TextBox TextBOX = (GHIElectronics.NETMF.Glide.UI.TextBox)window.GetChildByName(“TemperaturAnzeige”); TextBOX.Font = Resources.GetFont(Resources.FontResources.ArialStandard48); TextBOX.Text = “XY°°”; TextBOX.Invalidate(); May be not the best solution but it works