/ Forums / Advansys Formativ / Formativ Creator / NewControlBoxDialog bug & stds issue / Reply To: NewControlBoxDialog bug & stds issue

Support 2

    The Formativ engineering team reviewed the issues and agreed with your observations. Today we updated the installation file to include the following fixes/enhancements:

    • Fixed a bug that caused an index out of bounds error if a dialog with no controls had its AutoSize property set to TRUE.
    • Button 6 on the standard dialog is no longer hidden if the Wizard Image is turned off.
    • Added a new property to the standard dialog – CancelButton. This property specifies which Formativ dialog button functions as the Cancel button. The default is Button 2 (Btn2).
    • Added a new property to the standard dialog – DefaultButton. This property specifies which Formativ dialog button functions as the Default button, which has the initial focus. The default is Button 1 (Btn1). If another button does not have the focus, then the default button value is returned when the Enter key is pressed.
    • StdDlgButtons constants have been updated to reflect the new internal values used to represent the six standard dialog buttons. The return values are now sequential from 1 to 6 and directly relate to the number in the button name. As long as you have not hard coded button values in your macros, this change will not affect you. If you have hard coded button values for Buttons 5 and 6, you should replace them with the appropriate StdDlgButtons constants (i.e. Btn5 and Btn6) to ensure correct behavior.
    • Updated some of the shipping macros to take advantage of the new CancelButton property.

    The modified macro example below illustrates a couple of the updates.


    Sub Main(Client, GWEvent)

    const SIGNATURE_LOCATION = "c:signatures"

    set SigDlg = Utilities.NewControlBoxDialog
    with SigDlg
    .Caption = CAPTION
    .Title = "Select Signature"
    .CancelButton = Btn1
    .Button1Caption = "&None"
    .Button2Caption = "&Personal"
    .Button3Visible = TRUE
    .Button3Caption = "&Casual"
    .Button4Visible = TRUE
    .Button4Caption = "&Disclaimer"
    .Button5Visible = TRUE
    .Button5Caption = "&View/Edit"
    end with

    SigDlg.Height = 120
    SigDlg.ShowWizardImage = FALSE

    rButton = SigDlg.Execute

    SigList = Array("Cancel","Personal","Casual","Disclaimer","ViewEdit")

    if rButton <> 1 then
    SigFile = SIGNATURE_LOCATION & SigList(rButton - 1) & ".sig"
    end if

    End Sub

    Thank you again for your feedback. We hope that this update will more effectively address your and other users dialog requirements. Please download the update from the Formativ download page and let us know if you have any further problems or suggestions.


    Advansys Support