Hello All,
I am making a text editor and have got the following 4 buttons included- cut, copy, paste & clear clipboard. How would i make the cut, copy and paste buttons only clickable when either text is highlighted to cut or copy and for the paste button only to appear when text has been previously highlighted and the cut and copy button has been pressed.
Private Sub cutbtn_Click(sender As System.Object, e As System.EventArgs) Handles cutbtn.Click
richtextbox.Cut()
End Sub
Private Sub copybtn_Click(sender As System.Object, e As System.EventArgs) Handles copybtn.Click
richtextbox.Copy()
End Sub
Private Sub pastebtn_Click(sender As System.Object, e As System.EventArgs) Handles pastebtn.Click
richtextbox.Paste()
Private Sub clearclipboardbtn_Click(sender As System.Object, e As System.EventArgs) Handles clearclipboardbtn.Click
My.Computer.Clipboard.Clear()
End Sub
Any ideas?:wave:
I am making a text editor and have got the following 4 buttons included- cut, copy, paste & clear clipboard. How would i make the cut, copy and paste buttons only clickable when either text is highlighted to cut or copy and for the paste button only to appear when text has been previously highlighted and the cut and copy button has been pressed.
Private Sub cutbtn_Click(sender As System.Object, e As System.EventArgs) Handles cutbtn.Click
richtextbox.Cut()
End Sub
Private Sub copybtn_Click(sender As System.Object, e As System.EventArgs) Handles copybtn.Click
richtextbox.Copy()
End Sub
Private Sub pastebtn_Click(sender As System.Object, e As System.EventArgs) Handles pastebtn.Click
richtextbox.Paste()
Private Sub clearclipboardbtn_Click(sender As System.Object, e As System.EventArgs) Handles clearclipboardbtn.Click
My.Computer.Clipboard.Clear()
End Sub
Any ideas?:wave: