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
TableRowBase:addadd_anchoradd_centeredanchorattention_lostaugment_mouse_eventbg_colorbg_imageborder_colorborder_widthcall_handlercall_parent_handlercell_rectclick_itemdefer_drawingdismissdrawdraw_item_and_highlightdraw_overdraw_posthighlightdraw_prehighlightfg_colorfocusfocus_switchfontget_cursorget_focusget_margin_rectget_rootget_top_widgetget_visibleglobal_to_localhas_focushighlight_styleinheritedinvalidateis_gl_containeritem_is_selectedkey_downkey_uplocal_to_globalmarginmenu_barnum_colsnum_rowsparentparent_resizedpresentrectrelative_moderemoveremove_anchorresizedscale_bgscroll_button_colorscroll_button_sizesel_colorsel_widthset_parentset_size_for_texttab_stopvisible