none
How to justify a single line in a paragraph? RRS feed

  • Question

  • I'm recently working on a text editor application using RichTextBox. I'm able to divide the user's input text into multiple pages when the text content size is bigger than the page size by taking the overflowing text into another page. The the paragraphs are well justified right-to-left and left-to-tight except the last line in the last paragraph when I'm taking that overflowing text into the newly created page. This line should be justified like the others lines in the same paragraph because it has a another part in the next page.

    I know I can use space mono fonts and replace the blank spaces with measured size of space characters. But it seem to cause another font problem inside the text.

    How can I make that last line justified to the end of page width?


    Sunday, July 28, 2019 7:03 AM

All replies

  • Hi

    Here is alink to my version of a RTB editor. Not fantastic, but seems to do all the formatting OK, including Justification over page breaks.

    It has a novel way of dealing with ContextMenus, just a trial of an idea.

    It loads a sample file, but has a Load File option to get rid of that.

    This is a LINK to the complete VB Project file set, see if there is anything there that helps.


    Regards Les, Livingston, Scotland



    • Edited by leshay Sunday, July 28, 2019 2:00 PM
    Sunday, July 28, 2019 1:55 PM
  • Hi

    I really appreciate your early help. I've been away for a lot of problems. I found your link but it is not working now . If you could please refresh it !

    Thanks in advance


    Friday, October 25, 2019 1:42 PM
  • Hi

    I really appreciate your early help. I've been away for a lot of problems. I found your link but it is not working now . If you could please refresh it !

    Thanks in advance


    Hi

    Here is the LINK again.


    Regards Les, Livingston, Scotland

    Friday, October 25, 2019 1:57 PM
  • Thank you again

    I will see it now and be back to tell you what happened

    Friday, October 25, 2019 2:11 PM
  • Hi ! Leshay

    It seems that our needs are different. I need the page break justification like in MS Word. In another words what I need look like when you enter a "Shift+Enter" in a justified paragraph.

    I don't know if my question is understood but suppose that I only have one single line and I want to make it justified form the edge to the opposite edge. I think it's the same as making the page (n) last paragraph and the page (n+1) first paragraph treated as one paragraph like in MS Word

    Sunday, October 27, 2019 4:18 PM