Difference between revisions of "IAdeUICallbacks::AskMsgComboBox"

(Marked this version for translation)
(Added info about MarshalAs on array parameter)
 
Line 3: Line 3:
 
<languages />
 
<languages />
 
<translate>
 
<translate>
= string [[IAdeUICallbacks]]::AskMsgComboBox(([in] string question, [in] string title, [in] array<string> optionList, [in] string defaultText, [in] bool bShowAll, [out] bool * bCancel)= <!--T:1-->
+
= 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)= <!--T:1-->
  
 
<!--T:2-->
 
<!--T:2-->
Line 19: Line 19:
 
* «defaultText»: The default text shown initially.
 
* «defaultText»: The default text shown initially.
 
* «bShowAll»: a Boolean indicating whether the '''All''' selection should be shown as an option.
 
* «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.
  
  
Line 29: Line 30:
 
<!--T:8-->
 
<!--T:8-->
 
Set «bCancel» to '''True''' if the user presses '''Cancel''', '''False''' otherwise. '''True''' will cause the current computation to be aborted.
 
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
 +
 +
:VB.NET:
 +
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
 +
 +
:C#
 +
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)
  
 
= Examples = <!--T:9-->
 
= Examples = <!--T:9-->

Latest revision as of 01:11, 5 February 2016

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.

Parameters

  • «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

VB.NET:
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
C#
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)

Examples

See Also

Comments


You are not allowed to post comments.