ComboBox Element - A combination of a single-line input and a drop-down menu. User can type in their own value or choose from list.
| 2227 | # Combo # |
| 2228 | # ---------------------------------------------------------------------- # |
| 2229 | class Combo(Element): |
| 2230 | """ |
| 2231 | ComboBox Element - A combination of a single-line input and a drop-down menu. User can type in their own value or choose from list. |
| 2232 | """ |
| 2233 | |
| 2234 | def __init__(self, values, default_value=None, size=(None, None), s=(None, None), auto_size_text=None, background_color=None, text_color=None, button_background_color=None, |
| 2235 | button_arrow_color=None, bind_return_key=False, setting=None, change_submits=False, enable_events=False, enable_per_char_events=None, disabled=False,right_click_menu=None, key=None, k=None, pad=None, |
| 2236 | p=None, expand_x=False, expand_y=False, tooltip=None, readonly=False, font=None, visible=True, metadata=None): |
| 2237 | """ |
| 2238 | :param values: values to choose. While displayed as text, the items returned are what the caller supplied, not text |
| 2239 | :type values: List[Any] or Tuple[Any] |
| 2240 | :param default_value: Choice to be displayed as initial value. Must match one of values variable contents |
| 2241 | :type default_value: (Any) |
| 2242 | :param size: width, height. Width = characters-wide, height = NOTE it's the number of entries to show in the list. If an Int is passed rather than a tuple, then height is auto-set to 1 and width is value of the int |
| 2243 | :type size: (int, int) | (None, None) | int |
| 2244 | :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 |
| 2245 | :type s: (int, int) | (None, None) | int |
| 2246 | :param auto_size_text: True if element should be the same size as the contents |
| 2247 | :type auto_size_text: (bool) |
| 2248 | :param background_color: color of background |
| 2249 | :type background_color: (str) |
| 2250 | :param text_color: color of the text |
| 2251 | :type text_color: (str) |
| 2252 | :param button_background_color: The color of the background of the button on the combo box |
| 2253 | :type button_background_color: (str) |
| 2254 | :param button_arrow_color: The color of the arrow on the button on the combo box |
| 2255 | :type button_arrow_color: (str) |
| 2256 | :param bind_return_key: If True, then the return key will cause a the Combo to generate an event when return key is pressed |
| 2257 | :type bind_return_key: (bool) |
| 2258 | :param setting: If not None, then this element will be saved in a settings file using the key for the element |
| 2259 | :type setting: (Any) |
| 2260 | :param change_submits: DEPRICATED DO NOT USE. Use `enable_events` instead |
| 2261 | :type change_submits: (bool) |
| 2262 | :param enable_events: Turns on the element specific events. Combo event is when a choice is made |
| 2263 | :type enable_events: (bool) |
| 2264 | :param enable_per_char_events: Enables generation of events for every character that's input. This is like the Input element's events |
| 2265 | :type enable_per_char_events: (bool) |
| 2266 | :param disabled: set disable state for element |
| 2267 | :type disabled: (bool) |
| 2268 | :param right_click_menu: A list of lists of Menu items to show when this element is right clicked. See user docs for exact format. |
| 2269 | :type right_click_menu: List[List[ List[str] | str ]] |
| 2270 | :param key: Used with window.find_element and with return values to uniquely identify this element |
| 2271 | :type key: str | int | tuple | object |
| 2272 | :param k: Same as the Key. You can use either k or key. Which ever is set will be used. |
| 2273 | :type k: str | int | tuple | object |
| 2274 | :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) |
| 2275 | :type pad: (int, int) or ((int, int),(int,int)) or (int,(int,int)) or ((int, int),int) | int |
| 2276 | :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 |
| 2277 | :type p: (int, int) or ((int, int),(int,int)) or (int,(int,int)) or ((int, int),int) | int |
| 2278 | :param expand_x: If True the element will automatically expand in the X direction to fill available space |
| 2279 | :type expand_x: (bool) |
| 2280 | :param expand_y: If True the element will automatically expand in the Y direction to fill available space |
| 2281 | :type expand_y: (bool) |
| 2282 | :param tooltip: text that will appear when mouse hovers over this element |
| 2283 | :type tooltip: (str) |
| 2284 | :param readonly: make element readonly (user can't change). True means user cannot change |
| 2285 | :type readonly: (bool) |
| 2286 | :param font: specifies the font family, size, etc. Tuple or Single string format 'name size styles'. Styles: italic * roman bold normal underline overstrike |
no outgoing calls
no test coverage detected