Ticket T304549
Visible to All Users

MemoExPopupForm - Provide CreateMemoEdit() that can be overridden

created 9 years ago

Hello DX,

I'm creating a MemoExEdit descendant. It's main control in the popupform is a MemoEdit and I ideally would like to reuse my MemoEdit descendant.

Currently we can easily replace the default MemoExPopupForm with the overridable CreatePopupForm(). But in the derived MemoExPopupForm there's no method to provide a MemoEdit descendant. If you could add an overridable CreateMemoEdit() in the MemoExPopupForm class that be ideal.

Thanks!

Alex

Answers approved by DevExpress Support

created 9 years ago (modified 9 years ago)

We have implemented the functionality described in this ticket. It will be included in our next update(s).

Please check back and leave a comment to this response to let us know whether or not this solution addresses your concerns.

Additional information:

We introduced the virtual CreateMemoEdit method, which will be available for overload in version 15.1.8 of our components.

    created 9 years ago (modified 9 years ago)

    Hi Alexandre,
    UPDATE:
    We introduced the virtual CreateMemoEdit method, which will be available for overload in version 15.1.8 of our components.

    There are no methods to override creating the inner MemoEdit component. Try creating a MemoExPopupForm class descendant in the following manner:

    C#
    public class CustomEdit1PopupForm : MemoExPopupForm { MemoEdit memo; public CustomEdit1PopupForm(CustomEdit1 ownerEdit) : base(ownerEdit) { if (memo == null) { this.memo = new MemoEdit(); } this.memo.BorderStyle = BorderStyles.NoBorder; this.memo.Properties.Appearance.Assign(ownerEdit.Properties.AppearanceDropDown); this.memo.MenuManager = OwnerEdit.MenuManager; this.memo.Visible = false; this.memo.Modified += new EventHandler(OnMemo_Modified); this.Controls.Add(memo); CreateSeparatorLine(); UpdateMemo(); } protected override ControlHelper CreateHelper() { return base.CreateHelper(); } protected override void Dispose(bool disposing) { if (disposing) { if (Memo != null) { this.memo.Modified -= new EventHandler(OnMemo_Modified); this.memo.Dispose(); this.memo = null; } } base.Dispose(disposing); } protected override MemoEdit Memo { get { if (memo == null) { memo = new MemoEdit(); } return memo; } } }

    Let me know if everything is OK with this custom class. Otherwise, please describe the task you are trying to accomplish in greater detail. We will do our best to provide you with an appropriate solution.
    I hope to hear from you soon.

      Show previous comments (3)
      Alisher (DevExpress Support) 9 years ago

        You are always welcome!

          Thanks it now works like a charm in 15.1.8.

          Alisher (DevExpress Support) 9 years ago

            :)

            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.