/ Forums / Advansys Formativ / Creating Solutions with Formativ / DateTimePicker.Checked always returns true?

  • Creator
  • #3983

      hi there!

      i have a DateTimePicker with .ShowCheckBox = TRUE. Now that Picker does show a CheckBox but no matter if it´s checked or not the DateTimePicker.Checked Property always says TRUE?

      anyone help me out?

    • Author
    • #6776
      Support 1

        You are correct, and this is a bug. I have written a test applet that verifies this behaviour of .Checked with .ShowCheckBox = True. I have also noticed that setting .Checked = False in code makes no difference. Source code of my test applet is listed below.

        This issue has been recorded in the Formativ Bug Database. Our engineers will look at fixing this for the forthcoming release, version 2.

        option explicit
        Sub Main(Client, GWEvent)
          dim iDialogResult
          dim iIsDone
          dim oControlDlg
          dim oDateTimePicker
          dim oLabel
          ' Create control box & controls...
          set oControlDlg = Utilities.NewControlBoxDialog
          oControlDlg.AutoSize = True
          oControlDlg.Caption = "My caption"
          oControlDlg.Title = "Configuration Settings"
          oControlDlg.Button1Caption = "OK"
          oControlDlg.Button2Caption = "Cancel"
          set oDateTimePicker = oControlDlg.AddDateTimeControl
          oDateTimePicker.ShowCheckBox = True
          oDateTimePicker.Date = Date
          set oLabel = oControlDlg.AddMultiLineLabelControl
          ' Execute the dialog until we're done...
          iIsDone = False
            iDialogResult = oControlDlg.Execute
            Select Case iDialogResult
              Case BTN1 ' OK
                if oDateTimePicker.Checked then
                  oLabel.Caption = "Checked"
                  oLabel.Caption = "Not checked"
                end if
              Case BTN2 ' Cancel
                iIsDone = True
            End Select
          Loop Until iIsDone
          set oDateTimePicker = nothing
          set oLabel = nothing
          set oControlDlg = nothing
        End Sub

        Advansys Support



          is there a bugfix available now?
          Or when do you expect the release of version 2?

          Support 1a

            This error has not been fixed in 1.6, and most likely won’t be. It may make it into version 2.0, but has been given a lower priority due to the new V2 Forms designer that eliminates this issue.

            Version 2.0 is due for release in about 4-6 weeks.

            Advansys Support


              Hey all, sorry to resurrect an old post, but it’s now 2012, 8 years later and this bug still exists in my Formativ version

              Is there any word on when / if this issue of setting the Checkbox property of the DateTimePicker having no efect will be fixed?

              I note in the post above that preference has been given to the new V2 Forms designer, but I need to create dynamic fields with dynamic event handlers that a recent support reply indicated was not possible in the forms designer. Hence I need this issue resolved as I am forced to use the current out-dated NewControlBoxDialog methodology to meet my needs within Formativ.

              Any feedback would be greatly appreciated.



              Support 1

                Thanks for your question. Unfortunately the DateTimePicker defect is not scheduled to be fixed.

                Have you considered using a ListView/RzListView control (V2 Forms Designer) for representing a variable number of fields? At least one of these controls can optionally display a checkbox. Sometimes ListView/RzListView is a reasonable alternative to creating form controls dynamically.

                Kind regards,
                Advansys Support


                  Hi, Thanks for your reply.

                  Yes I have considered the ListView/RzListView. Unfortunately this control is far too simplistic / restrictive for use, as a) I need to display different types of dynamic fields, Edit Boxes, Lists, Combo Boxes, Dates, Times etc. and b) Even if I could create these datatypes within the list, I need to dynamically assign event handlers to these dynamic field values which are only known at run time

                  I have also considered using the HTML dialog to achieve the required functionality. Although the use of javascript would allow me to configure dynamic events, I would need to access information back inside the applet from within the javascript update, aka Reverse Ajax which I’m not sure I can achieve inside the portal.

                  Anyway, for now I’m back to using the forms designer creating dynamic fields, and then not having event handlers but instead creating a wizard style solution to handle data entry. This creates a much more long-winded solution, but it’ll be as functional as I can make it given the current restrictions previously mentioned.

                  Thanks again,


                  Support 1

                    Thanks for the detailed reply.

                    If you need to support a variable number of fields, you may find the ScrollBox control helpful. Unlike a Panel, ScrollBox will display a horizontal/vertical scrollbar automatically, as needed when a control is placed on it. Also, if the fields you need to display are ‘regular’, eg. N groups where each group contains:

                    CheckBox, EditBox, List, ComboBox, Date, Time

                    then it can be helpful to use Panel/RzPanel as a container for each group. You could use the Panel’s Align property (eg. Align=alTop) to auto-position each Panel in the container ScrollBox.

                    I hope this helps.

                    Kind regards,
                    Advansys Support

                  Viewing 7 replies - 1 through 7 (of 7 total)
                  • You must be logged in to reply to this topic.