GUIBRUSHR.GUI.WIDGET.MyButton module¶
- class GUIBRUSHR.GUI.WIDGET.MyButton.MyButton(parent: Any, row: int, column: int, text: str, bg: str, command, color_panel: str = '#AAAAAA', fg: str = 'black', size_text: int = 12, columnspan: int = 1, sticky: str = 'NSEW', **kwargs: Dict[str, Any])[source]¶
Bases:
FrameA custom button widget that wraps tkinter’s Button in a Frame for better layout control.
This class creates a button with customizable appearance and behavior, inheriting from Frame to provide better grid layout management and consistent styling.
- button¶
The underlying tkinter Button widget
- Type:
Button
- __init__(parent: Any, row: int, column: int, text: str, bg: str, command, color_panel: str = '#AAAAAA', fg: str = 'black', size_text: int = 12, columnspan: int = 1, sticky: str = 'NSEW', **kwargs: Dict[str, Any]) None[source]¶
Initialize the MyButton widget.
- Parameters:
parent – The parent widget
row – Row position in the parent’s grid
column – Column position in the parent’s grid
text – Text to display on the button
bg – Background color of the button
command – Function to call when button is clicked
color_panel – Background color of the containing frame
fg – Text color of the button
size_text – Font size of the button text
columnspan – Number of columns the button should span
sticky – Grid sticky parameter for button placement
**kwargs – Additional keyword arguments passed to the Button widget