Ticket T154470
Visible to All Users

Components added to TcxTabSheet are not displayed at runtime when TcxPageControl is hosted in a TFrame

created 11 years ago

I am building a re-usable TFrame which contains a TcxPageControl. The idea is the frame is dropped onto the form and then I can add pages specific to that form.
This works fine, I can successfully add pages through the designer and at runtime those tab pages appear. However, the problem is any components that are dropped onto the TcxTabSheet don't.
If I add a page on the Frame itself (i.e. the base Frame, not the one dropped onto the form) and drop components on that, those show. However, if I drop components onto that same page from the form they don't.
I am clearly missing something here but I would have thought the page control would just work as it would on any form (regardless if it's being surfaced from a TFrame) but clearly there seems to be something it doesn't like.
Is this a bug or am I just not doing it right?
Note - I am using the "Add to Palette" option to add the Frame as a component as I want to surface the TPageControl properties (incase that matters)

Answers approved by DevExpress Support

created 11 years ago (modified 11 years ago)

Hello James,

This is a limitation of the VCL Frames technology. It is prohibited to place additional controls on a Frame instance. If you try the same approach with the standard TPageControl control, it will not even let you create additional tabs. Moreover, if you try to place a button on your frame that is placed on the Form5 form, the IDE will not let you do so - the button will be placed on the Form5 form instead. As a solution, you can create a descendant of your TAthenaOptionsFrame frame (File->New->Other…->DelphiProjects->Inheritable Items), place required controls there, and use this new frame class on your form. Please let me know if you need any help with this solution.

    Comments (1)

      Hi Paulo,
      Thanks for the update - I did see that the TPageControl prohibits this behaviour but then I noticed I could with a TcxPageControl (perhaps the TcxPageControl should disable this behaviour also as it appears misleading?).
      I will go with the inheritance approach in the meantime, thanks.

      Disclaimer: The information provided on DevExpress.com and affiliated web properties (including the DevExpress Support Center) is provided "as is" without warranty of any kind. Developer Express Inc disclaims all warranties, either express or implied, including the warranties of merchantability and fitness for a particular purpose. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.

      Confidential Information: Developer Express Inc does not wish to receive, will not act to procure, nor will it solicit, confidential or proprietary materials and information from you through the DevExpress Support Center or its web properties. Any and all materials or information divulged during chats, email communications, online discussions, Support Center tickets, or made available to Developer Express Inc in any manner will be deemed NOT to be confidential by Developer Express Inc. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.