Revision as of 01:11, 5 February 2016 by Lchrisman (Talk | contribs) (Added info about MarshalAs on array parameter)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

ADE User Guide > ADE Server Class Reference > IAdeUICallbacks

Other languages:
English • ‎中文

string IAdeUICallbacks::AskMsgComboBox(([in] string question, [in] string title, [in] array<string> optionList, [in] string defaultText, [in] bool bShowAll, [out] bool * bCancel, [out] bool* bAllSelected)

Called when the AskMsgChoice() function is evaluated, and a combo box is requested (the «comboBox» parameter is true).

You implement this method to display a user-interface element that displays a question and allows the user to enter a line of text, with a list of possible suggestions provided.


  • «question»: the question to show the user
  • «title»: the caption for the dialog shown
  • «optionList»: The list of options to display.
  • «defaultText»: The default text shown initially.
  • «bShowAll»: a Boolean indicating whether the All selection should be shown as an option.
  • «bCancel»: returns as true when user pressed cancel
  • «bAllSelected»: return value. Set to true when user selects the "All" option.

Return value

The text entered or selected by the user.

Set «bCancel» to True if the user presses Cancel, False otherwise. True will cause the current computation to be aborted.

Implementing the array parameter in .NET

When you implement this method in a .NET program, you must adorn the parameter with a MarshalAs attribute as follows

Function AskMsgComboBox(ByVal question As String, ByVal Title As String, 
                          <MarshalAs(UnmanagedType.SafeArray, SafeArraySubType:=VarEnum.VT_BSTR)> ByVal optionList As System.Array, 
                           ByVal defaultText As String, 
                           ByVal bShowAll As Boolean, 
                           ByRef bCancel As Boolean ,
                           ByRef bAllSelected As Boolean) 
                  As String Implements ADE.IAdeUICallbacks.AskMsgComboBox
public string AskMsgComboBox(string question, 
                           string title, 
                           [MarshalAs(UnmanagedType.SafeArray, SafeArraySubType = VarEnum.VT_BSTR)] Array optionList, 
                           string defaultText, 
                           bool bShowAll, 
                            out bool bCancel, 
                            out bool bAllSelected)


See Also


You are not allowed to post comments.