I've created a RichTextBox dynamically in a method called newTab(), and assigned its .KeyDown event an eventhandler. In this event handler, this code does not work:
(RichTextBox)tabControl1.SelectedTab.Controls[0].AppendText(tabSpace)
Visual Studio says, "Only assignment, call, increment, decrement, await, and new object expressions can be used as a statement"
Why is this? I'm pretty sure I got syntax messed up here, but this has worked before...I think.
Thanks for the help in advance!
“It is not that I'm so smart. But I stay with the questions much longer.” ― Albert Einstein
No comments:
Post a Comment