OnGetChoices Method

Called by the Choices engine once per rebind operation to retrieve the dynamic choices for the design-time control.

Syntax

OnGetChoices(ByVal Choices as Choices)

Parameters

Choices

A temporary Choices collection into which the control should add any dynamic choices.

Remarks

Use OnGetChoices to publish the dynamic and static choices from a control.

Because the Choices collection is released after the rebinding pass is complete, you need to add the choices into this list each time this method is called. Note that this method can be called quite frequently, so the control should not perform expensive operations during this method.

Design-time controls can make modifications to their static choices in their implementations of this method. The Choices engine waits to make a snapshot of the static choices for a design-time control until after this method returns.

Applies to   IDesignTimeControl interface