Recent

Author Topic: Composed control problems  (Read 3801 times)

ssamayoa

  • Full Member
  • ***
  • Posts: 163
Composed control problems
« on: October 02, 2007, 10:24:03 pm »
I'm porting TJvNavigationPane to Lazarus.

This component contains other components which can be modified via object inspector, even delete it.

How can avoid that?

I also have a event with procedural getter and setter, because hooks into inner control event. This event shows as <unpublished> in the object inspector and the only difference from other event properties is that is the first published event with procedural getter/setter:

Code: [Select]

    property IconPanel: TJvIconPanel read FIconPanel;
    property OnDropDownMenu: TContextPopupEvent read FOnDropDownMenu write FOnDropDownMenu;
    property OnSplitterCanResize: TCanResizeEvent read GetSplitterCanResize write SetSplitterCanResize;
    property OnSplitterMoved: TNotifyEvent read GetSplitterMoved write SetSplitterMoved;


This property in the form file (.lfm) has a explicit nil:

Code: [Select]

    NavPanelHotTrackFont.Style = [fsBold]
    OnSplitterCanResize = nil


Why this happends?

Regards.

LuizAmérico

  • Sr. Member
  • ****
  • Posts: 458
Composed control problems
« Reply #1 on: October 04, 2007, 12:50:24 am »
Quote
This component contains other components which can be modified via object inspector, even delete it.

How can avoid that?


Control.ControlStyle := Control.ControlStyle + [csNoDesignSelectable];

ssamayoa

  • Full Member
  • ***
  • Posts: 163
Composed control problems
« Reply #2 on: October 04, 2007, 01:01:19 am »
Thanks.

 

TinyPortal © 2005-2018