delphi - how to add a property to a component that will reflect on the object inspector -


in delphi 7 , when adding propery object, how possible see property in object inspector?

make property published. instance,

private   fmyproperty: integer; published   property myproperty: integer read fmyproperty write fmyproperty; 

often, need repaint control (or other processing) when property changed. can do

private   fmyproperty: integer;   procedure setmyproperty(myproperty: integer); published   property myproperty: integer read fmyproperty write setmyproperty;  ...  procedure tmycontrol.setmyproperty(myproperty: integer); begin   if fmyproperty <> myproperty   begin     fmyproperty := myproperty;     invalidate; // example   end; end; 

Comments

Popular posts from this blog

javascript - Enclosure Memory Copies -

php - Replacing tags in braces, even nested tags, with regex -