Solved

Double Space in RTB

Posted on 2004-09-20
2
244 Views
Last Modified: 2010-05-02
Does anyone know how to doublespace lines in a RTB  lso i just want to double space the lines i have selected.

example..

line1
line2
line3

becomes

line1

line2

line3
0
Comment
Question by:BI5HOP
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 26

Accepted Solution

by:
EDDYKT earned 250 total points
ID: 12104478
How about


Private Sub rtfText_KeyDown(KeyCode As Integer, Shift As Integer)
If (KeyCode = 13) Then
    If (Len(rtfText.SelText) > 0) Then
        Debug.Print Replace(Replace(rtfText.SelText, vbCrLf & vbCrLf, vbCrLf), vbCrLf, vbCrLf & vbCrLf)
        KeyCode = 0
        rtfText.SelText = Replace(Replace(rtfText.SelText, vbCrLf & vbCrLf, vbCrLf), vbCrLf, vbCrLf & vbCrLf)
    End If
End If
End Sub
0
 

Author Comment

by:BI5HOP
ID: 12105513
I had to make a small change since i wanted it on rightclick i forgot to mention that but yea it worked great thanks :)

0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

If you have ever used Microsoft Word then you know that it has a good spell checker and it may have occurred to you that the ability to check spelling might be a nice piece of functionality to add to certain applications of yours. Well the code that…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

724 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question