shifting text in a richedit

Posted on 2009-12-16
Last Modified: 2013-11-23
Hello Experts,

In my program I am showing the results of a UDP packet inside of a RichEdit and then parsing out some unnecessary text to get only the information I need, however the result does not look like how I would like for it to look so I am wondering if there is a way to shift the text in the richedit to get the desired result.

I have attached an image which illustrates the problem in more detail as well as the result I am wanting to achieve. If anyone can help then please do not hesitate to respond and thanks in advance for your replies.  


Question by:ezpete
    LVL 12

    Expert Comment

    It looks like you have WordWrap set to true in the first RichEdit... if this is true, you can then try to set it to false on all RichEdits, and that might solve your problem...

    LVL 12

    Accepted Solution

    Giving it a second thought that would not probably solve it...
    however, one other thing you can try is to remove all linefeeds in the text... but that might remove some of the information you are interested in?

      AnsiReplaceStr(YourUDPDataAsText, #13#10, '');

    Author Comment


    2 mins after posting I discovered my problem (I was not adding the LF character in the StringReplace call) which fixed my problem, however you already posted and maybe your solution will be helpful to someone else so I will award you the points and thank for taking the time to reply.


    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Better Security Awareness With Threat Intelligence

    See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

    A lot of questions regard threads in Delphi.   One of the more specific questions is how to show progress of the thread.   Updating a progressbar from inside a thread is a mistake. A solution to this would be to send a synchronized message to the…
    In our object-oriented world the class is a minimal unit, a brick for constructing our applications. It is an abstraction and we know well how to use it. In well-designed software we are not usually interested in knowing how objects look in memory. …
    The viewer will learn how to synchronize PHP projects with a remote server in NetBeans IDE 8.0 for Windows.
    The viewer will learn how to use and create new code templates in NetBeans IDE 8.0 for Windows.

    758 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

    Need Help in Real-Time?

    Connect with top rated Experts

    13 Experts available now in Live!

    Get 1:1 Help Now