I'm relatively new to C# and come a bit stuck.
I've got a Rich Textbox on a form, and I would like to update this from a different class to the Form itself.
I first tried
Form1.outputTextbox.AppendText(string);
but the text box was not accessible, made sense. So instead I tried to make a function. On Form1 I created the function
public void updateTextBox(string new_text)
{
outputTextBox.AppendText(new_text);
}
and in the class I used.
Form1.updateTextBox("apple");
The problem I'm having is the only way my class can see the function is if I make it the function static, but when I do that get an error "An object reference is required for the nonstatic field, method, or property 'member'"
Am I close or going to wrong way about this completely? Any help would be appricated.