Custom action area button names

You can use the se the appendActionButton method to add action area buttons.

The flags in Table 1 cover all the semantics you might need in a dialog box. As a result, there is no need for any additional custom flags; however, there may be cases where you want to use a different label for one of the standard actions. To use a different label for one of the standard actions, you do not specify any button flags in the constructor arguments; you use the appendActionButton method to add your own action area buttons. The appendActionButton method has two prototypes:

appendActionButton(buttonId)
appendActionButton(text, tgt, sel)

The first version of the prototype creates a standard action area button as defined in Table 1. The second version of the prototype creates a button whose label is given as the text argument. In addition, the second version allows you to set the target and selector so that you can catch messages from this button and act accordingly. The following statements show how you can create custom action area buttons:

class ActionAreaDB(AFXDialog):
    def __init__(self):

        AFXDialog.__init__(self, 'Action Area Example 2',
            0, DIALOG_ACTIONS_SEPARATOR)
        FXLabel(self, 'Custom action area example dialog.')
        self.appendActionButton('Highlight', self, 
            self.ID_CLICKED_APPLY)
        self.appendActionButton(self.CANCEL)
Figure 1. An example of a custom action area.