(element)
| 15665 | |
| 15666 | |
| 15667 | def _add_grab(element): |
| 15668 | |
| 15669 | try: |
| 15670 | if form.Grab is True or element.Grab is True: |
| 15671 | # if something already about to the button, then don't do the grab stuff |
| 15672 | if '<Button-1>' not in element.Widget.bind(): |
| 15673 | element.Widget.bind("<ButtonPress-1>", toplevel_form._StartMoveGrabAnywhere) |
| 15674 | element.Widget.bind("<ButtonRelease-1>", toplevel_form._StopMove) |
| 15675 | element.Widget.bind("<B1-Motion>", toplevel_form._OnMotionGrabAnywhere) |
| 15676 | element.ParentRowFrame.bind("<ButtonPress-1>", toplevel_form._StartMoveGrabAnywhere) |
| 15677 | element.ParentRowFrame.bind("<ButtonRelease-1>", toplevel_form._StopMove) |
| 15678 | element.ParentRowFrame.bind("<B1-Motion>", toplevel_form._OnMotionGrabAnywhere) |
| 15679 | if element.Type == ELEM_TYPE_COLUMN: |
| 15680 | element.TKColFrame.canvas.bind("<ButtonPress-1>", toplevel_form._StartMoveGrabAnywhere) |
| 15681 | element.TKColFrame.canvas.bind("<ButtonRelease-1>", toplevel_form._StopMove) |
| 15682 | element.TKColFrame.canvas.bind("<B1-Motion>", toplevel_form._OnMotionGrabAnywhere) |
| 15683 | except Exception as e: |
| 15684 | pass |
| 15685 | # print(e) |
| 15686 | |
| 15687 | def _add_right_click_menu_and_grab(element): |
| 15688 | if element.RightClickMenu == MENU_RIGHT_CLICK_DISABLED: |
no test coverage detected