> If I set the tab though in the Editor Properties, I want it to change
*all*
> the tabs, not just the tabs after I change the properties.
>
> I.E If I have a source file that is formatted at tab width of 3, and I
> change the tab width to 2, the old code width stays at 3.
>
> EG
> Source Tab width 3
>    FileStream := TFileStream.Create('d:\qdx\plurelat.qdx, fmOpenRead);
>    strList := TStringList.Create;
>    strList.Sorted := True;
>
> Now if I change the tab width to 2 and continue editting I get :
>
>    FileStream := TFileStream.Create('d:\qdx\plurelat.qdx, fmOpenRead);
>    strList := TStringList.Create;
>    strList.Sorted := True;
>   while FileStream.Read(FileStruct, 512) = 512 do
>   begin
>   for nCount := 1 to 7 do
>     strPLU_BCD := strPLU_BCD + Char(FileStruct[i]);
>   ...
>

Your problem is caused by some of the other settings in Editor Properties.
Delphi by default will actually use space characters to pad out the white
space. So if tab widths are 2 and you press the tab key you will actually
insert 2 spaces. To use tab characters you need to set Use Tab Character on
in Editor Properties. I think you also need to set Optimal Fill to ensure
that Delphi uses tab characters where possible when it automatically indents
for you.

Unfortunately it sounds like the source code you have was created with these
options off. So you have 3 space characters everywhere and AFAIK editor
options aren't going to help you. It maybe a case of global replaces to turn
every 3 space characters into a tab.

David Brennan.
DB Solutions Ltd.



---------------------------------------------------------------------------
    New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
                  Website: http://www.delphi.org.nz
To UnSub, send email to: [EMAIL PROTECTED] 
with body of "unsubscribe delphi"

Reply via email to