Full Justification In Rich Text Box Control In Vb.net
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 4 of 4

Thread: Full Justification In Rich Text Box Control In Vb.net

  1. #1
    Join Date
    Oct 2006
    Location
    Bhopal (India)
    Posts
    12

    Full Justification In Rich Text Box Control In Vb.net

    FULL JUSTIFICATION IN RICH TEXT BOX CONTROL IN VB.NET
    I am developing a small application for document movement by using RICH TEXT BOX in VB.NET. Thix box is meant for inputting by user any text. The text can be formatted in almost all maner, like RIGHT, CENTER and LEFT ALIGNED. However, I want the text to be FULLY JUSTIFIED (BOTH SIDE) too.

    Can anyone suggest me how to do it ? Please respond as it is very urgent, I will be grateful.

    T. ALEX JOHN
    BHOPAL (INDIA)

  2. #2
    Join Date
    Jul 2001
    Location
    Sunny South Africa
    Posts
    11,091

    Re: Full Justification In Rich Text Box Control In Vb.net

    Hello and welcome to the forums tarecorp!
    AFAIK, you can't do that through the richtextbox's properties.
    You may want to consider using the SetTextAlign API :
    http://custom.programming-in.net/art...f=SetTextAlign
    I hope these comments were useful

  3. #3
    Join Date
    Oct 2006
    Location
    Bhopal (India)
    Posts
    12

    Re: Full Justification In Rich Text Box Control In Vb.net

    Hi HanneSThEGreaT

    I tried SetTextAlign API, and could not get the result of FULL JUSTIFICATION. Can you please provide sample code.

    Thanks in Advance

    T. ALEX JOHN
    BHOPAL (INDIA)

  4. #4
    Join Date
    Feb 2000
    Location
    OH - USA
    Posts
    1,891

    Arrow Re: Full Justification In Rich Text Box Control In Vb.net

    You either have to do the math yourself, or use one of the newer versions of the RTF control. I can't believe how little info there is out there for this little trick, but here is a good link:
    http://discuss.fogcreek.com/joelonso...65&ixReplies=3
    Good Luck,
    Craig - CRG IT Solutions - Microsoft Gold Partner

    -My posts after 11/2011 = .NET 4.x and Visual Studio 2012
    -My posts after 02/2010 = .NET 4.0 and Visual Studio 2010
    -My posts after 12/2007 = .NET 3.5 and Visual Studio 2008
    -My posts after 04/2007 = .NET 3.0 and Visual Studio 2005
    -My posts before 04/2007 = .NET 1.1/2.0

    *I do not follow threads, so if you have a secondary question, message me.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Windows Mobile Development Center


Click Here to Expand Forum to Full Width

This is a CodeGuru survey question.


Featured


HTML5 Development Center