This is a special type of Button. It will close the window but NOT send an event that the window has been closed. It's used in conjunction with non-blocking windows to silently close them. They are used to implement the non-blocking popup windows. They're also found in some Demo
(button_text, image_filename=None, image_data=None, image_size=(None, None), image_subsample=None,
border_width=None, tooltip=None, size=(None, None), s=(None, None), auto_size_button=None, button_color=None, font=None,
disabled=False, bind_return_key=False, focus=False, pad=None, p=None, key=None, k=None, visible=True, metadata=None, expand_x=False, expand_y=False)
| 14528 | |
| 14529 | # ------------------------- Dummy BUTTON Element lazy function ------------------------- # |
| 14530 | def DummyButton(button_text, image_filename=None, image_data=None, image_size=(None, None), image_subsample=None, |
| 14531 | border_width=None, tooltip=None, size=(None, None), s=(None, None), auto_size_button=None, button_color=None, font=None, |
| 14532 | disabled=False, bind_return_key=False, focus=False, pad=None, p=None, key=None, k=None, visible=True, metadata=None, expand_x=False, expand_y=False): |
| 14533 | """ |
| 14534 | This is a special type of Button. |
| 14535 | |
| 14536 | It will close the window but NOT send an event that the window has been closed. |
| 14537 | |
| 14538 | It's used in conjunction with non-blocking windows to silently close them. They are used to |
| 14539 | implement the non-blocking popup windows. They're also found in some Demo Programs, so look there for proper use. |
| 14540 | |
| 14541 | :param button_text: text in the button |
| 14542 | :type button_text: (str) |
| 14543 | :param image_filename: image filename if there is a button image |
| 14544 | :type image_filename: image filename if there is a button image |
| 14545 | :param image_data: in-RAM image to be displayed on button |
| 14546 | :type image_data: in-RAM image to be displayed on button |
| 14547 | :param image_size: image size (O.K.) |
| 14548 | :type image_size: (Default = (None)) |
| 14549 | :param image_subsample: amount to reduce the size of the image |
| 14550 | :type image_subsample: amount to reduce the size of the image |
| 14551 | :param border_width: width of border around element |
| 14552 | :type border_width: (int) |
| 14553 | :param tooltip: text, that will appear when mouse hovers over the element |
| 14554 | :type tooltip: (str) |
| 14555 | :param size: (w,h) w=characters-wide, h=rows-high |
| 14556 | :type size: (int, int) |
| 14557 | :param s: Same as size parameter. It's an alias. If EITHER of them are set, then the one that's set will be used. If BOTH are set, size will be used |
| 14558 | :type s: (int, int) | (None, None) | int |
| 14559 | :param auto_size_button: True if button size is determined by button text |
| 14560 | :type auto_size_button: (bool) |
| 14561 | :param button_color: button color (foreground, background) |
| 14562 | :type button_color: (str, str) | str |
| 14563 | :param font: specifies the font family, size, etc. Tuple or Single string format 'name size styles'. Styles: italic * roman bold normal underline overstrike |
| 14564 | :type font: (str or (str, int[, str]) or None) |
| 14565 | :param disabled: set disable state for element (Default = False) |
| 14566 | :type disabled: (bool) |
| 14567 | :param bind_return_key: (Default = False) If True, this button will appear to be clicked when return key is pressed in other elements such as Input and elements with return key options |
| 14568 | :type bind_return_key: (bool) |
| 14569 | :param focus: if focus should be set to this |
| 14570 | :type focus: (bool) |
| 14571 | :param pad: Amount of padding to put around element in pixels (left/right, top/bottom) or ((left, right), (top, bottom)) or an int. If an int, then it's converted into a tuple (int, int) |
| 14572 | :type pad: (int, int) or ((int, int),(int,int)) or (int,(int,int)) or ((int, int),int) | int |
| 14573 | :param p: Same as pad parameter. It's an alias. If EITHER of them are set, then the one that's set will be used. If BOTH are set, pad will be used |
| 14574 | :type p: (int, int) or ((int, int),(int,int)) or (int,(int,int)) or ((int, int),int) | int |
| 14575 | :param key: key for uniquely identify this element (for window.find_element) |
| 14576 | :type key: str | int | tuple | object |
| 14577 | :param k: Same as the Key. You can use either k or key. Which ever is set will be used. |
| 14578 | :type k: str | int | tuple | object |
| 14579 | :param visible: set initial visibility state of the Button |
| 14580 | :type visible: (bool) |
| 14581 | :param metadata: Anything you want to store along with this button |
| 14582 | :type metadata: (Any) |
| 14583 | :param expand_x: If True Element will expand in the Horizontal directions |
| 14584 | :type expand_x: (bool) |
| 14585 | :param expand_y: If True Element will expand in the Vertical directions |
| 14586 | :type expand_y: (bool) |
| 14587 | :return: returns a button |