Module albow.table.TableRowView

Source code
from pygame import event

from albow.table.TableRowBase import TableRowBase


class TableRowView(TableRowBase):

    highlight_style = 'fill'
    vstretch = True

    #
    # Python 3 update to make sure scrolling values get passed through
    #
    def __init__(self, cellSize: tuple, nRows: int, scrolling: bool):
        super().__init__(cellSize, nRows, scrolling)

    def item_is_selected(self, n: int):
        return self.parent.row_is_selected(n)

    def click_item(self, n: int, e: event):
        self.parent.click_row(n, e)

Classes

class TableRowView (cellSize, nRows, scrolling)

The PaletteView class is an abstract base class for implementing tool palettes and similar things. A PaletteView displays an array of items which can be selected by clicking, with the selected item being highlighted. There is provision for scrolling, so that the palette can contain more items than are displayed at one time.

The PaletteView does not maintain the items themselves or keep track of which one is selected; these things are responsibilities of the subclass.

:param cell_size: :param nrows: :param scrolling:

Source code
class TableRowView(TableRowBase):

    highlight_style = 'fill'
    vstretch = True

    #
    # Python 3 update to make sure scrolling values get passed through
    #
    def __init__(self, cellSize: tuple, nRows: int, scrolling: bool):
        super().__init__(cellSize, nRows, scrolling)

    def item_is_selected(self, n: int):
        return self.parent.row_is_selected(n)

    def click_item(self, n: int, e: event):
        self.parent.click_row(n, e)

Ancestors

Class variables

var vstretch

Inherited members