Recent

Author Topic: Hideing propertyes in object inspector  (Read 3921 times)

Imants

  • Full Member
  • ***
  • Posts: 198
Hideing propertyes in object inspector
« on: September 26, 2010, 04:36:59 pm »
I am building my own custom grid component an I want to hide all inherited color properties like color, fixedcolor in object inspector.

I found one way:
RegisterPropertyEditor(TypeInfo(TColor), TCustomGrid, 'Color', THiddenPropertyEditor);

JuhaManninen

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4715
  • I like bugs.
Re: Hideing propertyes in object inspector
« Reply #1 on: September 26, 2010, 11:19:10 pm »
I am building my own custom grid component an I want to hide all inherited color properties like color, fixedcolor in object inspector.

Only published properties are shown in object inspector.
Properties like Color are not published by default if you inherit the component for example from TCustomGrid, TCustomDrawGrid or TCustomStringGrid.
See the source of TStringGrid. It only publishes the properties it wants to show and does nothing else.

So the answer is: only publish properties you want to show. Don't publish Color or FixedColor.

Juha
Mostly Lazarus trunk and FPC 3.2 on Manjaro Linux 64-bit.

 

TinyPortal © 2005-2018