Skip to content

Code for indent

Aisha Srivastava

Aisha Srivastava

Asked Feb 28, 2015, 10:08 AM EST1 answer
Share
LinkedInX
Want to indent my text in web browser control .I am making a html editor in win form.

how to get cursor selection and apply indent on that line ::text-indent:15px
 public void indent()
{

}

1 Answer

Know the answer? Post it. Somebody with the same question will find it here.

  • Afzaal Ahmad Zeeshan
    0
    There are many possible solutions for producing an indent. It depends on what you actually need to implement. 
    1. An indent is a margin on the left side of your document. You can add margins; depending on your framework it would be as, Control.Margin = new Thickness(0); etc. 
    2. You can add a tab spacing in the document at that location. 
    3. You can add a few white-spaces to the document at that location. That is what (I believe) other IDEs do too, because you can somehow select the text that causes an indent in your document.
    You can select from these solutions, and implement them in your own case. 
    0