CnPack Forum


 
Subject: Suggestion: Code Editor: Auto Align parameters
dbbanjo
新警察
Rank: 1



UID 67864
Digest Posts 0
Credits 4
Posts 1
点点分 4
Reading Access 10
Registered 2013-4-23
Status Offline
Post at 2013-4-23 22:31  Profile | Blog | P.M. 
Suggestion: Code Editor: Auto Align parameters

Howdy,

  Could an option be added which would provide the ability
to auto-align a parameter list according to the parameter type?

  Here is a before and after example:

      Before:
              procedure tFormCustomDrawCell(Sender: TObject; ACanvas: TCanvas; ARect: TRect;  ANode: TdxTreeListNode;
                                                            AColumn: TdxTreeListColumn; ASelected, AFocused, ANewItemRow: Boolean;
                                                            Var AText: String; Var AColor: TColor; AFont: TFont; Var AAlignment: TAlignment;
                                                            Var ADone: Boolean);

      After:
              procedure tFormCustomDrawCell(Sender: TObject;
                                                            ACanvas: TCanvas;
                                                            ARect: TRect;  ANode: TdxTreeListNode;
                                                            AColumn: TdxTreeListColumn;
                                                            ASelected, AFocused, ANewItemRow: Boolean;
                                                            Var AText: String;
                                                            Var AColor: TColor;
                                                            AFont: TFont;
                                                            Var AAlignment: TAlignment;
                                                            Var ADone: Boolean);

  Note: If the above ability is already present?   Please let me know where this
option is located ...

                     Thanks,

                           DbBanjo (Marc Bolen)
Top
Passion (LiuXiao)
管理员
Rank: 9Rank: 9Rank: 9


UID 359
Digest Posts 19
Credits 6750
Posts 3551
点点分 6750
Reading Access 102
Registered 2004-3-28
Status Offline
Post at 2013-5-4 11:47  Profile | Blog | P.M. 
It's a part of code formatting, but our code formatting feature is only for testing, not published.

It also can be done by a Pascal Script.
Top
WWebber
新警察
Rank: 1



UID 67885
Digest Posts 0
Credits 30
Posts 10
点点分 30
Reading Access 10
Registered 2013-5-18
Status Offline
Post at 2013-5-18 21:03  Profile | Blog | P.M. 
I would even prefer following output (which is even not possible with the RAD code formatter):

After:

procedure tFormCustomDrawCell(Sender:              TObject;
                                              ACanvas:             TCanvas;
                                              ARect:                TRect;  
                                              ANode:               TdxTreeListNode;
                                              AColumn:            TdxTreeListColumn;
                                              ASelected, AFocused, ANewItemRow: Boolean;
                                              Var AText:           String;
                                              Var AColor:           TColor;
                                              AFont:                 TFont;
                                              Var AAlignment:    TAlignment;
                                              Var ADone:           Boolean);

In C++ this would look like:

int          MyForm::TFormCustomDrawCell(TObject *       Sender,
                                                         TCanvas *        ACanvas,
                                                         TRect  &          ARect,
                                                          ...
                                                         bool &             Done)
{
}
Top
 




All times are GMT++8, the time now is 2024-3-29 01:47

    本论坛支付平台由支付宝提供
携手打造安全诚信的交易社区 Powered by Discuz! 5.0.0  © 2001-2006 Comsenz Inc.
Processed in 0.006607 second(s), 7 queries , Gzip enabled

Clear Cookies - Contact Us - CnPack Website - Archiver - WAP