How to define macros
Prev | Chapter 5. Tips and tricks | Next

## How to define macros

You can define macros - that means global available Python functions - in the onopen() action of the form, and then call it from any other action:

Example 5.7. Macro example

    def mymakro(hk_this,v):
      hk_this.show_warningmessage("Displaying the text: "+v)

This can be called from a buttons onclick action:

Example 5.8. Macro example (part II)

    mymakro(hk_this," my text")

Prev | Up | Next
How to use the last inserted value as a default for the next row that will be inserted | Home | How to format numbers