Table 1 shows the action that the application takes when each of these buttons is clicked.
If your dialog has more than one “apply” button, you can handle this by routing messages from the button to the apply message handler in the form. In the form, you can use the getPressedButtonId method to determine which button was pressed and take the appropriate action. For example, in your dialog constructor: self.appendActionButton('Plot', self, self.ID_PLOT) FXMAPFUNC(self, SEL_COMMAND, self.ID_PLOT, AFXDataDialog.onCmdApply) self.appendActionButton('Highlight', self, self.ID_HIGHLIGHT) FXMAPFUNC(self, SEL_COMMAND, self.ID_HIGHLIGHT, AFXDataDialog.onCmdApply) and in your form code: def doCustomChecks(self): if self.getPressedButtonId() == self.getCurrentDialog().ID_PLOT: # Enable plot commands, disable highlight commands else: # Enable highlight commands, disable plot commands return True |