| View previous topic :: View next topic |
| Author |
Message |
&Vage Grandmaster Cheater Supreme
Reputation: 0
Joined: 25 Jul 2008 Posts: 1053
|
Posted: Sun Mar 14, 2010 10:55 am Post subject: [C#]Nested Indentions |
|
|
| I'm currently working on nested indentions, like how text editors automatically indent lines. I currently don't know how to do this, any help?
|
|
| Back to top |
|
 |
iPromise Grandmaster Cheater
Reputation: -1
Joined: 27 Jun 2009 Posts: 529 Location: Canada
|
Posted: Sun Mar 14, 2010 10:59 am Post subject: |
|
|
hmm, for each new paragraph move 3 spaces to the right of your sentence?
no idea.
|
|
| Back to top |
|
 |
ArabProphet How do I cheat?
Reputation: 0
Joined: 15 Jan 2010 Posts: 7
|
Posted: Sun Mar 14, 2010 11:45 am Post subject: |
|
|
???
C# Express automatically indents for you.......
but you could always just use TAB lol...
like..
namespace adasdada
public void Main()
{
(tab)//code
(tab)//code
(tab)if ( )
(tab){
(tab)(tab)//code
(tab)}
}
|
|
| Back to top |
|
 |
&Vage Grandmaster Cheater Supreme
Reputation: 0
Joined: 25 Jul 2008 Posts: 1053
|
Posted: Mon Mar 15, 2010 9:33 am Post subject: |
|
|
/facepalm
Err any help?
|
|
| Back to top |
|
 |
Slugsnack Grandmaster Cheater Supreme
Reputation: 71
Joined: 24 Jan 2007 Posts: 1857
|
Posted: Mon Mar 15, 2010 3:50 pm Post subject: |
|
|
| Your question is unclear. Do you want to code a system which places the cursor so it appears auto-indentation is on ? Are you unclear how indentation should be done ? Is it the indentation you do not understand how to do or the code required to generate it ?
|
|
| Back to top |
|
 |
NINTENDO Grandmaster Cheater Supreme
Reputation: 0
Joined: 02 Nov 2007 Posts: 1371
|
Posted: Fri Mar 19, 2010 4:32 am Post subject: |
|
|
| ArabProphet wrote: | ???
C# Express automatically indents for you.......
but you could always just use TAB lol...
like..
namespace adasdada
public void Main()
{
(tab)//code
(tab)//code
(tab)if ( )
(tab){
(tab)(tab)//code
(tab)}
} |
NO MATE.
He wan't to do the indents in code at runtime.
| Slugsnack wrote: | | Your question is unclear. Do you want to code a system which places the cursor so it appears auto-indentation is on ? Are you unclear how indentation should be done ? Is it the indentation you do not understand how to do or the code required to generate it ? |
This is just a guess but I think he don't know how to code it.
_________________
Intel over amd yes. |
|
| Back to top |
|
 |
Slugsnack Grandmaster Cheater Supreme
Reputation: 71
Joined: 24 Jan 2007 Posts: 1857
|
Posted: Fri Mar 19, 2010 7:19 am Post subject: |
|
|
in the general case, your indentation is the same amount as the previous line. when there is a { then if the programmer is using allman then the next line will be 2 more spaces or one more tab in. if k & r then next line is previous line + 1 indentation as described above. you can check for allman/k&r by seeing if someone has written a { on a line by itself. when the person writes } then just make it match back up depending on the style you have detected for the last opening {. there are a lot of different styles that you could possibly take account of though so.. ya..
i don't see where your problem lies anyway. perhaps a better description of your problem would help. where is the code being written ? an edit control ? rich edit control ? etc. etc.
|
|
| Back to top |
|
 |
&Vage Grandmaster Cheater Supreme
Reputation: 0
Joined: 25 Jul 2008 Posts: 1053
|
Posted: Sun Mar 21, 2010 4:17 pm Post subject: |
|
|
| Slugsnack wrote: | in the general case, your indentation is the same amount as the previous line. when there is a { then if the programmer is using allman then the next line will be 2 more spaces or one more tab in. if k & r then next line is previous line + 1 indentation as described above. you can check for allman/k&r by seeing if someone has written a { on a line by itself. when the person writes } then just make it match back up depending on the style you have detected for the last opening {. there are a lot of different styles that you could possibly take account of though so.. ya..
i don't see where your problem lies anyway. perhaps a better description of your problem would help. where is the code being written ? an edit control ? rich edit control ? etc. etc. |
Ohhh sorry for the long delay time, I was on a road trip. Anyways ^ That.
Andddd rich edit control.
|
|
| Back to top |
|
 |
|