Resizing Flexgrid when the form is minimized

Posted by: r.trofymchuk on 5 June 2024, 11:14 am EST

    • Post Options:
    • Link

    Posted 5 June 2024, 11:14 am EST

    Hello,

    I noticed the following feature that when collapsing the form, the Flexgrid size changes

    This is affected by the value of the Anchor property. If it is set to Right, then after minimizing the form, the Flexgrid width is zero.

    When you restore the form size, the table size is also restored. However, in my real form, there are processes that constantly take into account the width of the table, so changing the table width to zero leads to other errors.

    I am using the 4.8 framework. The version of the controls is 4.8.20223.584. The system is Windows 11 Pro.

    WindowsApp3 (2).zip

  • Posted 6 June 2024, 3:39 am EST

    Hi,

    Anchoring the C1FlexGrid (or any other control) will automatically resize it when its parent control is resized, i.e. it tries to maintain same distance from left and right side (when anchored left and right). Thus, the width of the C1FlexGrid changes to Zero.

    However there is a MinimumSize property in Control class which can be used to set a lower limit for the size of the control. You can set this property to avoid getting a zero width and other errors.

    Please see the attached sample project for reference. We hope this solution works for you!

    Attachment: WindowsApp3.zip

    Thanks, and Regards,

    Kartik

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels