SimpleGraphics.DisplayText

Hi
I tested the SimpleGraphics.DisplayText() today.
but it is not work.
What I am missing?

     namespace GadgeteerApp1
{
    public partial class Program
    {
        // This method is run when the mainboard is powered up or reset.   
       
        void ProgramStarted()
        {
            
            Debug.Print("Program Started");
            button.ButtonPressed += new Button.ButtonEventHandler(button_ButtonPressed);
           
        }
        string test = "test";
        void button_ButtonPressed(Button sender, Button.ButtonState state)
        {
            
            led.BlinkOnce(Colors.Blue);
            display.SimpleGraphics.DisplayText(test,9,Colors.Brown,50,50);
            
        }
    }
}

I am a bit confused.

display.SimpleGraphics.DisplayText(test,9,Colors.Brown,50,50);

The DisplayText method requires a Font object after the text string. You have the number 9?

:slight_smile:

Why dont you use this instead of 9 ?

var font = Resources.GetFont(Resources.FontResources.small);

@ Mike, you are right, thanks.
@ Weiti, thanks, its work and your HANDLERS also works too. Thanks a lot.