Board index » delphi » Win32 and Form Generated Code.

Win32 and Form Generated Code.


2004-10-05 08:37:05 PM
delphi44
Hi,
I like to ask, does new Delphi 9 in Win32 project mode, support code
expanding / collapsing for Form generated code .
This part of each unit may be quite big, and it will be good to we have
possibility to collapse it.
thanks!
 
 

Re:Win32 and Form Generated Code.

Quote
I like to ask, does new Delphi 9 in Win32 project mode, support code
expanding / collapsing for Form generated code .
This part of each unit may be quite big, and it will be good to we
have possibility to collapse it.
D9 works just like other delphi releases and stores the designer
generated code in the form resource file.
 

Re:Win32 and Form Generated Code.

I was think about part of code generated inside .pas file (inside Form
class):
Button1: TButton;
Label1: TLabel;
Label2: TLabel;
DBGrid1: TDBGrid;
....
Label50: TLabel;
regards
"Jason Southwell" <XXXX@XXXXX.COM>writes
Quote
>I like to ask, does new Delphi 9 in Win32 project mode, support code
>expanding / collapsing for Form generated code .
>This part of each unit may be quite big, and it will be good to we
>have possibility to collapse it.

D9 works just like other delphi releases and stores the designer
generated code in the form resource file.
 

Re:Win32 and Form Generated Code.

Quote
I was think about part of code generated inside .pas file (inside Form
class):
Ahh,
Well by default, the code editor will collapse the entire class, not
specific fields. But you can manually add a region id around any
section you want to collapse. Just add something like:
TForm1 = class(TForm)
{$REGION 'Designer Managed Code'}
Edit1: TEdit;
PopupMenu1: TPopupMenu;
{$ENDREGION}
private
{ Private declarations }
public
{ Public declarations }
end;
The designer will collapse anything between the region directive.
 

Re:Win32 and Form Generated Code.

It will be fine if Delphi do this automaticaly
This part of code can be very big, and it can make navigation trough code
very hard.
regards
"Jason Southwell" <XXXX@XXXXX.COM>writes
Quote

>I was think about part of code generated inside .pas file (inside Form
>class):

Ahh,

Well by default, the code editor will collapse the entire class, not
specific fields. But you can manually add a region id around any
section you want to collapse. Just add something like:

TForm1 = class(TForm)
{$REGION 'Designer Managed Code'}
Edit1: TEdit;
PopupMenu1: TPopupMenu;
{$ENDREGION}
private
{ Private declarations }
public
{ Public declarations }
end;

The designer will collapse anything between the region directive.
 

Re:Win32 and Form Generated Code.

Quote
It will be fine if Delphi do this automaticaly

This part of code can be very big, and it can make navigation trough
code very hard.
It still is fine as you can add this manually too.