TermTk.TTkAbstract.abstractscrollview
TTkAbstractScrollView
- class TTkAbstractScrollView(*args, **kwargs)[source]
- addWidget(widget)
Warning
Method Deprecated,
use
TTkWidget
->layout
->addWidget
i.e.
parentWidget.layout().addWidget(childWidget)
- close()
- dragEnterEvent(evt) bool
This event handler, can be reimplemented in a subclass to receive drag events for the widget.
Note
Reimplement this function to handle this event
- Parameters
evt (
TTkDropEvent
) – The drop event- Returns
True if the event has been handled
- Return type
bool
- dragLeaveEvent(evt) bool
This event handler, can be reimplemented in a subclass to receive drag events for the widget.
Note
Reimplement this function to handle this event
- Parameters
evt (
TTkDropEvent
) – The drop event- Returns
True if the event has been handled
- Return type
bool
- dragMoveEvent(evt) bool
This event handler, can be reimplemented in a subclass to receive drag events for the widget.
Note
Reimplement this function to handle this event
- Parameters
evt (
TTkDropEvent
) – The drop event- Returns
True if the event has been handled
- Return type
bool
- dropEvent(evt) bool
This event handler, can be reimplemented in a subclass to receive drag events for the widget.
Note
Reimplement this function to handle this event
- Parameters
evt (
TTkDropEvent
) – The drop event- Returns
True if the event has been handled
- Return type
bool
- enterEvent(evt) bool
This event handler, can be reimplemented in a subclass to receive mouse enter events for the widget.
Note
Reimplement this function to handle this event
- Parameters
evt (
TTkMouseEvent
) – The mouse event- Returns
True if the event has been handled
- Return type
bool
- getPadding() -> (<class 'int'>, <class 'int'>, <class 'int'>, <class 'int'>)
Retrieve the widget padding sizes
- Returns
list[top, bottom, left, right]: the 4 padding sizes
- hide()
- keyEvent(evt) bool
This event handler, can be reimplemented in a subclass to receive key events for the widget.
Note
Reimplement this function to handle this event
- Parameters
evt (
TTkKeyEvent
) – The keyboard event- Returns
True if the event has been handled
- Return type
bool
- keyPressEvent(evt) bool
This event handler, can be reimplemented in a subclass to receive key press events for the widget.
Note
Reimplement this function to handle this event
- Parameters
evt (
TTkKeyEvent
) – The keyboard event- Returns
True if the event has been handled
- Return type
bool
- keyReleaseEvent(evt) bool
This event handler, can be reimplemented in a subclass to receive key release events for the widget.
Note
Reimplement this function to handle this event
- Parameters
evt (
TTkKeyEvent
) – The keyboard event- Returns
True if the event has been handled
- Return type
bool
- layout()
Get the layout
- Returns
The layout used
- Return type
TTkLayout
or derived
- leaveEvent(evt) bool
This event handler, can be reimplemented in a subclass to receive mouse leave events for the widget.
Note
Reimplement this function to handle this event
- Parameters
evt (
TTkMouseEvent
) – The mouse event- Returns
True if the event has been handled
- Return type
bool
- lowerWidget()
- mouseDoubleClickEvent(evt) bool
This event handler, can be reimplemented in a subclass to receive mouse click events for the widget.
Note
Reimplement this function to handle this event
- Parameters
evt (
TTkMouseEvent
) – The mouse event- Returns
True if the event has been handled
- Return type
bool
- mouseDragEvent(evt) bool
This event handler, can be reimplemented in a subclass to receive mouse drag events for the widget.
Note
Reimplement this function to handle this event
- Parameters
evt (
TTkMouseEvent
) – The mouse event- Returns
True if the event has been handled
- Return type
bool
- mouseEvent(evt)
Caution
Don’t touch this!
- mouseMoveEvent(evt) bool
This event handler, can be reimplemented in a subclass to receive mouse move events for the widget.
Note
Reimplement this function to handle this event
- Parameters
evt (
TTkMouseEvent
) – The mouse event- Returns
True if the event has been handled
- Return type
bool
- mousePressEvent(evt) bool
This event handler, can be reimplemented in a subclass to receive mouse press events for the widget.
Note
Reimplement this function to handle this event
- Parameters
evt (
TTkMouseEvent
) – The mouse event- Returns
True if the event has been handled
- Return type
bool
- mouseReleaseEvent(evt) bool
This event handler, can be reimplemented in a subclass to receive mouse release events for the widget.
Note
Reimplement this function to handle this event
- Parameters
evt (
TTkMouseEvent
) – The mouse event- Returns
True if the event has been handled
- Return type
bool
- mouseTapEvent(evt) bool
This event handler, can be reimplemented in a subclass to receive mouse click events for the widget.
Note
Reimplement this function to handle this event
- Parameters
evt (
TTkMouseEvent
) – The mouse event- Returns
True if the event has been handled
- Return type
bool
- move(x: int, y: int)
Move the widget
- Parameters
x (int) – x position
y (int) – y position
- moveEvent(x: int, y: int)
Event Callback triggered after a successful move
- name() str
- paintChildCanvas()
Caution
Don’t touch this!
- raiseWidget(raiseParent=True)
- removeWidget(widget)
Warning
Method Deprecated,
use
TTkWidget
->layout
->removeWidget
i.e.
parentWidget.layout().removeWidget(childWidget)
- resize(w: int, h: int)
Resize the widget
- Parameters
w (int) – the new width
h (int) – the new height
- setDisabled(disabled=True)
- setEnabled(enabled: bool = True)
- setFocus()
- setGeometry(x: int, y: int, w: int, h: int)
Resize and move the widget
- Parameters
x (int) – x position
y (int) – y position
w (int) – the new width
h (int) – the new height
- setName(name: str)
- setPadding(top: int, bottom: int, left: int, right: int)
Set the padding of the widget
- Parameters
top (int) – top padding
bottom (int) – bottom padding
left (int) – left padding
right (int) – right padding
- setVisible(visible: bool)
- show()
- wheelEvent(evt)[source]
This event handler, can be reimplemented in a subclass to receive mouse wheel events for the widget.
Note
Reimplement this function to handle this event
- Parameters
evt (
TTkMouseEvent
) – The mouse event- Returns
True if the event has been handled
- Return type
bool
TTkAbstractScrollViewLayout
- class TTkAbstractScrollViewLayout(*args, **kwargs)[source]
- addWidget(widget)
Add a widget to this Layout
- Parameters
widget (
TTkWidgets
) – the widget to be added
- addWidgets(widgets)
Add a list of widgets to this Layout
- Parameters
widgets (list of
TTkWidgets
) – the widget to be added
- insertWidget(index, widget)
- insertWidgets(index, widgets)
- layer()
- lowerWidget(widget)
- parent()
- raiseWidget(widget)
- removeItem(item)
- removeItems(items)
- removeWidget(widget)
Remove a widget from this Layout
- Parameters
widget (
TTkWidgets
) – the widget to be removed
- removeWidgets(widgets)
Remove a list of widget from this Layout
- Parameters
widgets (list of
TTkWidgets
) – the widget to be removed
- setLayer(layer)
- setOffset(x, y)
- setParent(parent)
TTkAbstractScrollViewGridLayout
- class TTkAbstractScrollViewGridLayout(*args, **kwargs)[source]
- addItem(item, row=None, col=None, rowspan=1, colspan=1)[source]
Add the item to this
TTkGridLayout
- Parameters
item (
TTkLayoutItem
) – the item to be addedrow (int) – the row of the grid, optional, defaults to None
col (int) – the col of the grid, optional, defaults to None
rowspan (int) – the rows used by the item, optional, defaults to 1
colspan (int) – the cols used by the item, optional, defaults to 1
direction (
Direction
) – The direction the new item will be added if row/col are not specified, defaults to defaults toHORIZONTAL
- addItems(items, row=None, col=None, rowspan=1, colspan=1, direction=3)
Add the items to this
TTkGridLayout
- Parameters
items (list of
TTkLayoutItem
) – the items to be addedrow (int) – the row of the grid, optional, defaults to None
col (int) – the col of the grid, optional, defaults to None
rowspan (int) – the rows used by the item, optional, defaults to 1
colspan (int) – the cols used by the item, optional, defaults to 1
direction (
Direction
) – The direction the new items will be added if row/col are not specified, defaults to defaults toHORIZONTAL
- addWidget(widget, row=None, col=None, rowspan=1, colspan=1)[source]
Add the widget to this
TTkGridLayout
, this function usesaddItem()
- Parameters
widget (
TTkWidget
) – the widget to be addedrow (int) – the row of the grid, optional, defaults to None
col (int) – the col of the grid, optional, defaults to None
rowspan (int) – the rows used by the widget, optional, defaults to 1
colspan (int) – the cols used by the widget, optional, defaults to 1
direction (
Direction
) – The direction the new item will be added if row/col are not specified, defaults to defaults toHORIZONTAL
- addWidgets(widgets, row=None, col=None, rowspan=1, colspan=1, direction=3)
Add the widgets to this
TTkGridLayout
, this function usesaddItem()
- Parameters
widgets (list of
TTkWidget
) – the widgets to be addedrow (int) – the row of the grid, optional, defaults to None
col (int) – the col of the grid, optional, defaults to None
rowspan (int) – the rows used by the widget, optional, defaults to 1
colspan (int) – the cols used by the widget, optional, defaults to 1
direction (
Direction
) – The direction the new items will be added if row/col are not specified, defaults to defaults toHORIZONTAL
- insertWidget(index, widget)
- insertWidgets(index, widgets)
- layer()
- lowerWidget(widget)
- maximumHeight() int
process the widgets and get the min size
- maximumWidth() int
process the widgets and get the min size
- minimumHeight() int
process the widgets and get the min size
- minimumWidth() int
process the widgets and get the min size
- parent()
- raiseWidget(widget)
- removeItem(item)
- removeItems(items)
- removeWidget(widget)
Remove a widget from this Layout
- Parameters
widget (
TTkWidgets
) – the widget to be removed
- removeWidgets(widgets)
Remove a list of widget from this Layout
- Parameters
widgets (list of
TTkWidgets
) – the widget to be removed
- setLayer(layer)
- setOffset(x, y)
- setParent(parent)