November 24, 2003 at 3:28 am #3983slickyfingersParticipant
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?
November 24, 2003 at 4:49 pm #6776
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 Do iDialogResult = oControlDlg.Execute Select Case iDialogResult Case BTN1 ' OK if oDateTimePicker.Checked then oLabel.Caption = "Checked" else 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 SupportApril 27, 2004 at 4:32 am #6778MarcoParticipant
is there a bugfix available now?
Or when do you expect the release of version 2?April 27, 2004 at 4:58 pm #6775Support 1aParticipant
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 SupportJanuary 31, 2012 at 8:12 pm #6781jasonchildParticipant
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 126.96.36.199
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.
JasonFebruary 1, 2012 at 3:44 pm #6777
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.
Advansys SupportFebruary 1, 2012 at 8:16 pm #6780jasonchildParticipant
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
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.
JasonFebruary 2, 2012 at 3:02 pm #6779
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.
- You must be logged in to reply to this topic.