TimePicker: Disable resize option and/or set MinSize

2 posts, 1 answers
  1. Johannes
    Johannes avatar
    66 posts
    Member since:
    Dec 2012

    Posted 11 Apr 2013 Link to this post

    How can I disable the resize option on a TimePicker Popup?

    How can I set the MinimumSize for the Popup so the user cannot change the Size of my TimePicker control at all?
    // This code does not work; user can still change the size of the TimePicker-Popup
    TimePickerElement.PopupContentElement.MinSize = new Size(300, 350);
    TimePickerElement.PopupForm.MinimumSize = new Size(300, 350);
  2. Answer
    Paul
    Admin
    Paul avatar
    60 posts

    Posted 16 Apr 2013 Link to this post

    Hello Johannes,

    Thank you for writing.

    The best way to disallow the resize of the popup menu is to use the following code snippet:
    this.radTimePicker1.TimePickerElement.PopupForm.SizingMode = SizingMode.None;

    Later if you want to control the size of the popup window you may use different properties, one of which is:
    int width = 500;
    int height = 500;
    Nikolay Aleksiev
    WinForms Q1 2013 boasts PivotGrid, PDF Viewer, Chart enhancements and more. Check out all of the latest highlights.
  3. UI for WinForms is Visual Studio 2017 Ready
Back to Top