Callback Property

Specifies the object that is called to populate the Text property for a Popup choice object.

Syntax

Set object.Callback = oName

Parameters

object

Popup choice object

oName

The object to call which can be any IDispatch object that has a method with the following syntax:

ProcessPopUpChoice(ByVal c as Choice, ByVal text as ChoiceSink, s as String, cancel as Boolean)

Remarks

Choice objects with this property call a method on the callback object to determine the value of the Text property. Typically the callback object puts up a dialog box to prompt the user for the text.

For example, you can use this type of Choice object to implement a New File choice that displays a Save As dialog box.

The ProcessPopUpChoice method should display a dialog box or similar interface that allows the user to enter text. The interface should also make it possible for the Choice parameters to supply a default value based on the current value in the UI control. When the user has finished, ProcessPopUpChoice returns the text of the user's selection in the s parameter. If the user cancels, the ProcessPopUpChoice should set the cancel parameter to True.

Applies to   Choice object