Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2003-11

a patch about propedits.pp

1 message · 1 person ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

GongYu

I Make a patch on propedits.pp, it make the property editor more like delphi, I know the modified property Name not completed like delphi, but I think it is better then the Old one.
For example:
Property Name (not completed like delphi)
delphi: BorderStyle
lazarus before modified: BORDERSTYLE
lazarus after modified: Borderstyle
Event Name (completed like delphi)
delphi: OnActive
lazarus before modified: ONACTIVE
lazarus after modified: OnActive
This is the modified code.
function TPropertyEditor.GetName:shortstring;
begin

  Result:=FPropList^[0].PropInfo^.Name;

{$ifdef VER1_0}

  //if Name is a event then Should OnXxx
  if (Length(Result)>3)
     and (Result[1] in ['O','o']) and (Result[2] in ['N','n'])  then
   Result:=Copy(Result,1,1)+LowerCase(Copy(Result,2,1))+Copy(Result,3,1)
           +LowerCase(Copy(Result,4,length(Result)-3))

else

  Result:=Copy(Result,1,1)+LowerCase(Copy(Result,2,length(Result)-1));

{$endif VER1_0}
end;

����������������������������GongYu

����������������������������������2003-11-13

Reply by email