ChkAllDay CheckBox

3 posts, 0 answers
  1. Al
    Al avatar
    19 posts
    Member since:
    Oct 2012

    Posted 17 Apr 2012 Link to this post

    I have created a custom appointment edit form.  I have created my own fields as well as disabling inherited fields that I did not need.  For the fields that I did not need, I moved them to an empty part of the form, set the Visible property to False and erased anything in the text property.

    However, I did this with the chkAllDay CheckBox.  Set the Visible property to false and erased the text in the Text Property.  The form designer reflects these changes - no text shows up next to the CheckBox.   Anytime that I run my program and use the form this CheckBox is visible on the form, and the original text is displayed.

    I have a simple fix for this.  In the MouseMove Event handling I use the following code:
    If (chkAllDay.Visible = True) Then
                chkAllDay.Visible = False
            End If

    This will make the control not visible as desired anytime the user moves the mouse.

    I just wanted to point out a possible bug - or if someone could show me what I'm doing wrong.

  2. Al
    Al avatar
    19 posts
    Member since:
    Oct 2012

    Posted 18 Apr 2012 Link to this post

    I have found that using the form load setting 'chkAllDay.Visible = false' does not work.  However,
    Protected Overrides Sub OnLoad(ByVal e As EventArgs)
            Me.chkAllDay.Visible = False
        End Sub

    does work correctly.  
  3. DevCraft banner
  4. Ivan Todorov
    Ivan Todorov avatar
    688 posts

    Posted 20 Apr 2012 Link to this post

    Hi Allen,

    Thank you for contacting us.

    This is not an issue but rather a particular behavior of the dialog's base implementation. In the base Load handler all strings across the dialog are localized. This means that their Text is changed according to the current RadSchedulerLocalizationProvider. You can override the LocalizeDialog method to modify the text of the controls and this would be the best way to do this.

    As to the visibility of the chkAllDay checkbox, it is modified internally depending on some settings. However, you can override the methods that modify its visibility to keep it hidden. The following code snippet demonstrates how you can achieve this:
    public class MyEditDialog : EditAppointmentDialog
        protected override void LocalizeDialog(RadSchedulerLocalizationProvider localizationProvider)
            this.chkAllDay.Text = "";
        protected override void OnLoad(EventArgs e)
            this.chkAllDay.Visible = false;
        public override void ShowRecurrenceDialog()
            this.chkAllDay.Visible = false;

    I hope you find this information useful. Feel free to write back if you have any further questions.

    All the best,
    Ivan Todorov
    the Telerik team
    RadControls for WinForms Q1'12 release is now live! Check out what's new or download a free trial >>
Back to Top