|
-
Sep 22nd, 2000, 01:04 PM
#1
Thread Starter
Lively Member
is there a way you can insert a line in a richtextbox? I have a command button that allows the user to insert a horizontal line in the richtextbox, but I don't know how to do it... another one... how do you put up a picture file in a richtextbox
-
Sep 22nd, 2000, 01:08 PM
#2
Fanatic Member
Are you talking about a empty line? Simply do the following:
Code:
Public Sub Command1_Click()
RichTextBox1.Text = RichTextBox1.Text & VbCrLf
End Sub
The VbCrLf places the empty line.
Gl,
D!m
-
Sep 22nd, 2000, 01:14 PM
#3
Thread Starter
Lively Member
no no no... a horizontal line
---------------------------------------------------------
like the one above... but solid and in one piece so that the user can move it or delete it with one push of a keyboard key
-
Sep 22nd, 2000, 01:40 PM
#4
_______
<?>
RichTextBox1.Text = RichTextBox1.Text & vbCrLf _
& "__________________________________" & vbCrLf
"A myth is not the succession of individual images,
but an integerated meaningful entity,
reflecting a distinct aspect of the real world."
___ Adolf Jensen
-
Sep 23rd, 2000, 12:25 PM
#5
It might be easier to place it into a Sub.
Code:
Sub AddLine(rtfBox As RichTextBox, chChar As String, iLength As Integer)
rtfBox.SelText = vbCrLf & String(iLength, chChar) & vbCrLf
End Sub
Private Sub Command1_Click()
RichTextBox1.SetFocus
'AddLine (RichTextBox), (Character to Use), (Length)
AddLine RichTextBox1, "_", 20
End Sub
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|