Page 1 of 1

VpiCommonDialogs:ask with more than 3 answers does not work

Posted: 21 Oct 2014 11:26
by Ferenc Nagy
The documentation of vpiCommonDialogs::ask forgets to emphasize that this procedure designed to handle less than 4 choices. My planned choices have been ["Yes","No","Always","Never"].
This library procedure is not prepared to handle more than 3 buttons. The "Never" button has been invisible.
No problem. Workarounds for myself:
A) Thow away a choice.
B) Assign a choice to the close button the dialog.
C) Dechiphere vpiCommonDialogs::ask and write my vpiCommonDialogs::ask4.
D) Write my own dialog with 4 buttons.
E) Solve the problem using two dialogs: ["Yes","No"] and ["Only now","From now on"].

Have you any other tricks?

Posted: 21 Oct 2014 12:43
by Harrison Pratt
Use this until you craft your own flexible dialog to accomdate a greater, variable number of buttons:

Code: Select all

        Title = "Do you want to do XXX?",         Choices = ["Yes","No","Always","Never"],         b_true = listSelect(Title,Choices,-1,PickedStr,_),