0

Is it possible to have the Event list in the IDE for a frame extended by an event I define in a TFrame descendant:

TYPE
  TFrame1 = CLASS(TFrame)
            ...
            ...
            PRIVATE
              FSomething : TNotifyEvent;
            PUBLISHED
              PROPERTY OnSomething : TNotifyEvent Read FSomething Write FSomething;
            END;

and then have "OnSomething" Visible in the IDE when I select the dropped TFrame on a form?

In a similar vein:

Is it possible to not have the sub-component on a TFrame selectable in the IDE, so that I can expose only the Events for my TFrame and not allow the user to access the events for the sub-components? And is it possible to "suppress" the standard events for a TFrame so that only the events I PUBLISH is visible?

HeartWare
  • 7,464
  • 2
  • 26
  • 30
  • It is possible to turn a frame into a component, which would then allow your additional event to appear in the Object Inspector and the events of the sub-components not appear there. I don't think you can hide the other events of the frame with that approach, though. – Philip J. Rayment Aug 01 '22 at 10:56
  • @PhilipJ.Rayment: How do you turn it into a Component (without having to re-code it from scratch)? And if done, it should be possible to hide the other events by inheriting from TCustomFrame instead of TFrame, since all TFrame does is inherit from TCustomFrame and publishing the events... – HeartWare Aug 01 '22 at 12:28
  • I was afraid you'd ask that! But I've tracked it down again. See [How to improve the use of Delphi Frames](https://stackoverflow.com/questions/2735521/how-to-improve-the-use-of-delphi-frames). But because you're designing the 'component' visually on a TFrame, I wouldn't think you could use a TCustomFrame. – Philip J. Rayment Aug 02 '22 at 09:44
  • @PhilipJ.Rayment: Thank you for the link. I'll read up on it... – HeartWare Aug 02 '22 at 12:07

0 Answers0