Board index » cppbuilder » Auto Indent of TRichEdit
enoc
![]() CBuilder Developer |
Sun, 15 Feb 2004 12:51:02 GMT
|
enoc
![]() CBuilder Developer |
Sun, 15 Feb 2004 12:51:02 GMT
Auto Indent of TRichEdit
Hello there,
Can someone tell me how to make a TRichEdit component auto indent. For abcd test _ After I have pressed Return Key, how can I make the cursor to: abcd test automatically and let user to type other characters. Thanks. |
Pete Frase
![]() CBuilder Developer |
Sun, 15 Feb 2004 16:20:26 GMT
Re:Auto Indent of TRichEditYou need to set the paragraph indent to the value you want. This is the correct way See FirstIndent/LeftIndent -- Quote"enoch" <en...@memdb.com> wrote in message news:3b8c73e2_1@dnews... |
enoc
![]() CBuilder Developer |
Sun, 15 Feb 2004 17:37:05 GMT
Re:Auto Indent of TRichEditHello Pete, I know these two fields in TRichEdit but I dont know how to make it work. This is a test (Line 1) After I press the Return key, I want a new line after the cursor and move This is a test (Line 1) This is similar to the code editor in Borland C++. I think I need to Thanks. "Pete Fraser" <pete.dot.fraser.@.at.frasersoft.dot.co.uk> ???g??l Quote> You need to set the paragraph indent to the value you want. This is the |
Pete Frase
![]() CBuilder Developer |
Sun, 15 Feb 2004 21:39:05 GMT
Re:Auto Indent of TRichEditYou probably want to catch the KeyDown event and if it's a VK_RETURN, copy any leading white space from the previous line (tabs/spaces) to this line. Make sure that you don't allow windows to action the Keycode also or you will get the white space inserted before the CR-LF (which you will have to add yourself before white space added). -- Quote"enoch" <en...@memdb.com> wrote in message news:3b8cb6f2_2@dnews... |