respond method
respond(prompt_text, default_response)
When implemented, returns a response from the user on prompting.
Your implementation should return None to indicate that the user has not responded to the prompt
(i.e. the user has pressed the Cancel button in the prompt window).
def respond(self, prompt_text: str, default_response: str):
...
| Parameter | Type | Description |
|---|---|---|
| prompt_text | str | Prompt text (i.e. title of the prompt window). |
| default_response | str | Default user response (i.e. initial value contained in the prompt window). |
Returns
User response (i.e. confirmed value contained in the prompt window).
Examples
Shows how to create an ASK field, and set its properties (MyPromptRespondent).
class MyPromptRespondent(aw.fields.IFieldUserPromptRespondent):
def respond(self, prompt_text, default_response):
return 'Response from MyPromptRespondent. ' + default_response
See Also
- module aspose.words.fields
- class IFieldUserPromptRespondent