A slider, horizontal or vertical
| 7840 | # Slider # |
| 7841 | # ---------------------------------------------------------------------- # |
| 7842 | class Slider(Element): |
| 7843 | """ |
| 7844 | A slider, horizontal or vertical |
| 7845 | """ |
| 7846 | |
| 7847 | def __init__(self, range=(None, None), default_value=None, resolution=None, tick_interval=None, orientation=None, |
| 7848 | disable_number_display=False, setting=None, border_width=None, relief=None, change_submits=False, |
| 7849 | enable_events=False, disabled=False, size=(None, None), s=(None, None), font=None, background_color=None, |
| 7850 | text_color=None, trough_color=None, key=None, k=None, pad=None, p=None, expand_x=False, expand_y=False, tooltip=None, visible=True, metadata=None): |
| 7851 | """ |
| 7852 | :param range: slider's range (min value, max value) |
| 7853 | :type range: (int, int) | Tuple[float, float] |
| 7854 | :param default_value: starting value for the slider |
| 7855 | :type default_value: int | float |
| 7856 | :param resolution: the smallest amount the slider can be moved |
| 7857 | :type resolution: int | float |
| 7858 | :param tick_interval: how often a visible tick should be shown next to slider |
| 7859 | :type tick_interval: int | float |
| 7860 | :param orientation: 'horizontal' or 'vertical' ('h' or 'v' also work) |
| 7861 | :type orientation: (str) |
| 7862 | :param disable_number_display: if True no number will be displayed by the Slider Element |
| 7863 | :type disable_number_display: (bool) |
| 7864 | :param setting: If not None, then this element will be saved in a settings file using the key for the element |
| 7865 | :type setting: (Any) |
| 7866 | :param border_width: width of border around element in pixels |
| 7867 | :type border_width: (int) |
| 7868 | :param relief: relief style. Use constants - RELIEF_RAISED RELIEF_SUNKEN RELIEF_FLAT RELIEF_RIDGE RELIEF_GROOVE RELIEF_SOLID |
| 7869 | :type relief: str | None |
| 7870 | :param change_submits: * DEPRICATED DO NOT USE. Use `enable_events` instead |
| 7871 | :type change_submits: (bool) |
| 7872 | :param enable_events: If True then moving the slider will generate an Event |
| 7873 | :type enable_events: (bool) |
| 7874 | :param disabled: set disable state for element |
| 7875 | :type disabled: (bool) |
| 7876 | :param size: (l=length chars/rows, w=width pixels) |
| 7877 | :type size: (int, int) |
| 7878 | :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 |
| 7879 | :type s: (int, int) | (None, None) |
| 7880 | :param font: specifies the font family, size, etc. Tuple or Single string format 'name size styles'. Styles: italic * roman bold normal underline overstrike |
| 7881 | :type font: (str or (str, int[, str]) or None) |
| 7882 | :param background_color: color of slider's background |
| 7883 | :type background_color: (str) |
| 7884 | :param text_color: color of the slider's text |
| 7885 | :type text_color: (str) |
| 7886 | :param trough_color: color of the slider's trough |
| 7887 | :type trough_color: (str) |
| 7888 | :param key: Value that uniquely identifies this element from all other elements. Used when Finding an element or in return values. Must be unique to the window |
| 7889 | :type key: str | int | tuple | object |
| 7890 | :param k: Same as the Key. You can use either k or key. Which ever is set will be used. |
| 7891 | :type k: str | int | tuple | object |
| 7892 | :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) |
| 7893 | :type pad: (int, int) or ((int, int),(int,int)) or (int,(int,int)) or ((int, int),int) | int |
| 7894 | :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 |
| 7895 | :type p: (int, int) or ((int, int),(int,int)) or (int,(int,int)) or ((int, int),int) | int |
| 7896 | :param expand_x: If True the element will automatically expand in the X direction to fill available space |
| 7897 | :type expand_x: (bool) |
| 7898 | :param expand_y: If True the element will automatically expand in the Y direction to fill available space |
| 7899 | :type expand_y: (bool) |
no outgoing calls
no test coverage detected