0

I'm a noob to the .net world and I was wondering how I would go about creating a rich text box by triggering a click event button. I am trying to shrink the data currently in my form. One way of doing this would be to take away the two rich text boxes I have drag/dropped into the form and just adding a button. When the button is clicked, a rich text box will pop up. Any guidance will be greatly appreciated.

2
Contributors
1
Reply
2
Views
4 Years
Discussion Span
Last Post by Mitja Bonca
0

do:

Private rtb1 As RichTextBox
Private Sub button1_Click(sender As Object, e As EventArgs)
    rtb1 = New RichTextBox()
    rtb1.Name = "rtb1"
    rtb1.Size = New Size(300, 200)
    'set it
    rtb1.Location = New Point(20, 20)
    'set it
    Me.Controls.Add(rtb1)
End Sub
This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.