Skip to content

Latest commit

 

History

History
50 lines (34 loc) · 1.16 KB

ctl_button.rst

File metadata and controls

50 lines (34 loc) · 1.16 KB

Class CtlButton

Introduction

Class for working with button controls in a dialog.

EventArgsCallbackT

All :py:protocol:`~ooodev.utils.type_var.EventArgsCallbackT` callbacks include control_src as a keyword argument.

A callback can be in the format of:

def on_some_event(
    src: Any, event: EventArgs, control_src: CtlButton, *args, **kwargs
) -> None:
    pass

or

def on_some_event(src: Any, event: EventArgs, *args, **kwargs) -> None:
    # can get control from kwargs
    ctl = cast(CtlButton, kwargs['control_src'])

Example

.. cssclass:: screen_shot

    .. image:: https://user-images.githubusercontent.com/4193389/283562180-33f4293a-408d-43d8-92db-d287a4168050.png
        :alt: List Box Examples Screen Shot
        :align: center
        :width: 550px

For an example see Tab and List Box Dialog Example

Class

.. autoclass:: ooodev.dialog.dl_control.CtlButton
    :members:
    :undoc-members:
    :show-inheritance:
    :inherited-members: