TedOnTheNet
TedOnTheNet

Reputation: 1102

Delphi XE: how to disable declaration wrapping?

I haven't been using Delphi these last few years (last version I worked with was D2005) and I need to do some work in DelphiXE now. My question is, how do I disable declaration wrapping in the Delphi IDE? currently I use modelmaker's code explorer to unwrap them, but I cannot imagine that this can't be disabled! I've tried editing the right margins in the editor options, but that doesn't seem to help anything.

Below is an example of what I get when I add an event procedure via the object inspector of my treeview control:

procedure
    TfrmSomeLongInheritedEditFormName.vstStringTreeviewComponentAdvancedHeaderDraw(
    Sender: TVTHeader; var PaintInfo: THeaderPaintInfo; const Elements:
    THeaderPaintElements);
begin
  inherited;
end;

But i want it like this:

procedure TfrmSomeLongInheritedEditFormName.vstStringTreeviewComponentAdvancedHeaderDraw(Sender: TVTHeader; var PaintInfo: THeaderPaintInfo; const Elements: THeaderPaintElements);
begin
  inherited;
end;

Is it possible or do I need to keep editing the code by hand (or by using code explorer)?

Upvotes: 1

Views: 932

Answers (2)

bummi
bummi

Reputation: 27377

There are two places to change the settings for the right margin:

  • Formatter | Delphi | Line breaks | Right margin
  • Editor Options | Display | Right Margin

Setting the former to a large value is enough to ensure that IDE generated methods do not wrap. Set the latter to a large value to ensure that the code formatter does not wrap long lines.

Upvotes: 4

TedOnTheNet
TedOnTheNet

Reputation: 1102

In Modelmaker's MMX tools there is a way. Go to the Modelmaker code explorer options > Pascal > editing. In the group "Code lay out" there is a "wrap margin". I've increased the value from 80 to 400. works fine now!

As far as I know, there's no way to do it in the IDE.

Upvotes: 1

Related Questions