Recent

Author Topic: Destroying edit format  (Read 6167 times)

Anthony

  • Guest
Destroying edit format
« on: May 29, 2005, 11:29:03 am »
Hello,

I like to write my programs in a format I am used to. A form class look like this:
Code: [Select]

Type    TForm1  = Class (TForm)
                  Private
                  Public
                  End;

If I add a visual component to a form Lazarus adds <CR><LF> after the word    Type, adds the line { TForm1 } to it, adds <CR><LF> and shifts the Class declaration to the left. Now it looks like this:
Code: [Select]

Type

{ TForm1 }

TForm1  = Class (TForm)
                     Button1: TButton;
                  Private
                  Public
                  End;

I edit it back but it is a lot of work to do after every putting of a component.
I am happy with Delphi as this behavior is not present there.

Can it be switched off / disabled?

Thanks.

Marc

  • Administrator
  • Hero Member
  • *
  • Posts: 2556
Destroying edit format
« Reply #1 on: June 02, 2005, 11:13:43 am »
The IDE puts a
Code: [Select]
{ TForm1 } before the TForm1 declaration. In your case it is between the type and TForm1.
I don't know if this can turned off.
Can you file a bugreport that the { TForm 1 } comment should be placed on the line before the TForm1 declaration, and not between the type and the declaration.
This way yuor formatting wont be touched.
//--
{$I stdsig.inc}
//-I still can't read someones mind
//-Bugs reported here will be forgotten. Use the bug tracker

mattias

  • Administrator
  • Full Member
  • *
  • Posts: 179
    • http://www.lazarus.freepascal.org
Destroying edit format
« Reply #2 on: June 03, 2005, 12:58:40 am »
Disable it
Environment -> CodeTools Options -> Code Creation -> Header Comment for class

Anthony

  • Guest
Destroying edit format
« Reply #3 on: June 03, 2005, 09:10:31 am »
Matitas, thanks

 

TinyPortal © 2005-2018