Internal callback for the ENTER / RETURN key. Results in calling the ButtonCallBack for element that has the return key bound to it, just as if button was clicked. :param event: :type event:
(self, event)
| 1287 | return |
| 1288 | |
| 1289 | def _ReturnKeyHandler(self, event): |
| 1290 | """ |
| 1291 | Internal callback for the ENTER / RETURN key. Results in calling the ButtonCallBack for element that has the return key bound to it, just as if button was clicked. |
| 1292 | |
| 1293 | :param event: |
| 1294 | :type event: |
| 1295 | |
| 1296 | """ |
| 1297 | # if the element is disabled, ignore the event |
| 1298 | if self.Disabled: |
| 1299 | return |
| 1300 | |
| 1301 | MyForm = self.ParentForm |
| 1302 | button_element = self._FindReturnKeyBoundButton(MyForm) |
| 1303 | if button_element is not None: |
| 1304 | # if the Button has been disabled, then don't perform the callback |
| 1305 | if button_element.Disabled: |
| 1306 | return |
| 1307 | button_element.ButtonCallBack() |
| 1308 | |
| 1309 | def _generic_callback_handler(self, alternative_to_key=None, force_key_to_be=None): |
| 1310 | """ |
nothing calls this directly
no test coverage detected