Ticket T120980
Visible to All Users

Can not get RichEditControl Autosize to work with DevEx 14.1

created 11 years ago

Hi,

I upgraded my project from DevEx 12.2 to 14.1 and trying to replace MemoEdit controls with RichEdit controls to leverage the autosize behaviour, however, can not get this to work.

Follwoing is the layout structure of the form…(Sample application is attached)
Xtraform>Layout Control>LayoutControlGroups>LayoutControlItems> Flowlayout Panel>RichEdit control

The intention is to keep the minimum size of Richeditcontrol and the autosize it vertically as the user types in. Please see the screenshot attched which has MemoEdit controls. (The look should be same with RichEdit controls).
Also, for eg if I type in the RichEdit control #2 it should autogrow and the controls below it should move further down the form.
Looks like its hard to achieve and looking forward for your help.

Thank you !

Comments (2)

    The sample project

    DevExpress Support Team 11 years ago

      Hi Monal,
      Just wanted to drop you a note to let you know that I need a bit more time to finish working on my answer to your inquiry.  Thanks so much for your patience.

      I have noticed NullReferenceException if the  RichEditControl.ActiveViewType property is set to the Simple View at design time. I have created a separate ticket in this regard and passed it to our developers: NullReferenceException occurs if the RichEditControl.ActiveViewType property is set to Simple View at design time . They will research this behavior in detail. We will inform you once we obtain any results.

      Answers approved by DevExpress Support

      created 11 years ago

      I have researched your project and found that the RichEditControl.ActiveViewType property is set to the PrintLayout View . I would like to note that the RichEditControl provides the auto-size  feature only for the Simple View .Please refer to the   Add the capability to resize control based on own content size topic for more information.

      At the moment, the RichEditControl does not support the auto-size feature within a LayoutControl. In other words, a layout control item that contains a RichEditControl will not be adjusted to fit the RichEditControl if its content size increases the layout control item size. I beleive it would be a useful feature for the LayoutControl, so I have added a note to implement this functionality in the future. You can refer to the Provide a capability to change the RichEditControl size automatically based on its content when the control located in a LayoutControl thread  to learn about our progress in this regard.

      I would like to note that a MemoEdit editor does not support the auto-size feature within a LayoutControl either. So, it appears that you implemented some additional logic to achieve the goal on your side. To learn more about controls which support the auto-size feature in a LayoutControl, check the Aligning Controls Within Layout Items  help topic. To enable the auto-size feature for a control located in a LayoutControl, use the BaseControl.AutoSizeInLayoutControl  property. When the  BaseControl.AutoSizeInLayoutControl  property is enabled, the control's size shrinks to fit its content.

      I hope you will find this information useful. Feel free to contact us if you have further difficulties. We are happy to help you at any time.

        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.