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

#5360
Support 2
Moderator

Thanks for your feedback. The return values of the buttons are effectively arbitrary numbers. It is correct that Button 5 returns a value of 6 and you will find that Button 6 returns a value of 7. This design is based on the value of constants used within the ‘behind the scenes’ code in the Utility Object DLL.

The best way to make your code appear more intuitive is to use the inbuilt Formativ constants for the button return values, i.e. Btn1 for Button 1, Btn5 for Button 5 and so on. For example,

if rButton = Btn5 then
‘do something
end if

In regards to the OK and Cancel button positioning, you can simply change the captions of the first two buttons (buttons 1 & 2) to achieve your desired interface requirements and use the Btn1 and Btn2 constants when you check the dialog return value.

I hope this helps clarify the operation of the dialog buttons. Please let me know if you have any other questions.

Thanks,

Advansys Support