[Webinar] Streamline your web hosting managementRegister Today

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 151
  • Last Modified:

Rich Text Box Control Question

How can I force a small left margin in the rtf box? If you look at wordpad you'll see what I mean. I'd like to be able to make the cursor turn into an arrow and select the whole line like in wordpad as well.
0
mkill22
Asked:
mkill22
1 Solution
 
jbilCommented:
Private Sub Form_Load()
RichTextBox1.SelIndent = 150
End Sub

Private Sub RichTextBox1_MouseDown(Button As Integer, Shift As Integer, x As Single, y As Single)
If x < 150 Then
SendKeys "+{end}"
Else
'do normal
End If
End Sub

Private Sub RichTextBox1_MouseMove(Button As Integer, Shift As Integer, x As Single, y As Single)
If x < 150 Then
MousePointer = vbArrow
Else
MousePointer = vbDefault
End If
End Sub

0

Featured Post

The new generation of project management tools

With monday.com’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now