[lazarus] a patch about propedits.pp

GongYu 425009 at sina.com
Thu Nov 13 09:52:52 EST 2003


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
¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡425009 at sina.com
¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡2003-11-13








More information about the Lazarus mailing list