widgets Package

widgets Package

class Cronometer(*args, **kwargs)

Bases: wx.gizmos.LEDNumberCtrl

OnSize(*args, **kwargs)

data Module

class DataEditor(win, table, hide=[], frame=None, relations=None)

Bases: object

DataDelete()
DataInsert()
DataNew()
DataSelect(key)
DataUpdate()
SetAll()
iscombo(field)
class DataPanel(win, table, hide=[], frame=None, relations=None)

Bases: nabla.wx.widgets.data.DataEditor

ButtonPanel(parent)
EditPanel(parent, fields=None)
FilterPanel(parent, title='Filtro', all='')
ListPanel(parent, title='Lista')
OnDeleteButton(event)
OnNewButton(event)
OnUpdateButton(event)
SelectPanel(parent, filter='Filtro', title='Lista')

date Module

class DatePicker(parent, call=None, *args, **kwargs)

Bases: wx._controls.DatePickerCtrl

GetValue()

Returns datetime.datetime values

SetValue(value)

Set either datetime.datetime or wx.DateTime

class DateTimePicker(parent, call=None, *args, **kwargs)

Bases: wx._windows.Panel

GetValue()
SetValue(value)
class TimePicker(parent, call=None, *args, **kwargs)

Bases: wx.lib.masked.timectrl.TimeCtrl

Now()

grid Module

class ColLabelRenderer(bgcolor)

Bases: wx.lib.mixins.gridlabelrenderer.GridLabelRenderer

Draw(grid, dc, rect, col)
class CornerLabelRenderer

Bases: wx.lib.mixins.gridlabelrenderer.GridLabelRenderer

Draw(grid, dc, rect, rc)
class Grid(*args, **kw)

Bases: wx.grid.Grid, wx.lib.mixins.gridlabelrenderer.GridWithLabelRenderersMixin

class GridAssign(parent, rows=None, cols=None, titles=[], sizes=[], vars=[], call=None, change=None, *args, **kw)

Bases: wx.grid.Grid, wx.lib.mixins.gridlabelrenderer.GridWithLabelRenderersMixin

OnValueChange(event=None)
Values(values=[])
Variables(vars=[])
class GridRowSelect(parent, rows=None, cols=None, titles=[], sizes=[], call=None, double=None, title=None, *args, **kw)

Bases: wx.grid.Grid, wx.lib.mixins.gridlabelrenderer.GridWithLabelRenderersMixin

class RowLabelRenderer(bgcolor)

Bases: wx.lib.mixins.gridlabelrenderer.GridLabelRenderer

Draw(grid, dc, rect, row)

list Module

wx.ListCtrl style:
wx.LC_ICON wx.LC_LIST wx.LC_REPORT wx.LC_SMALL_ICON wx.LC_EDIT_LABELS
Eventos de ListCtrl
wx.EVT_LIST_BEGIN_DRAG wx.EVT_LIST_BEGIN_RDRAG wx.EVT_LIST_DELETE_ALL_ITEMS wx.EVT_LIST_DELETE_ITEM wx.EVT_LIST_INSERT_ITEM wx.EVT_LIST_ITEM_ACTIVATED wx.EVT_LIST_ITEM_DESELECTED wx.EVT_LIST_ITEM_FOCUSED wx.EVT_LIST_ITEM_MIDDLE_CLICK wx.EVT_LIST_ITEM_RIGHT_CLICK wx.EVT_LIST_ITEM_SELECTED wx.EVT_LIST_ITEM_KEY_DOWN wx.EVT_LIST_COL_BEGIN_DRAG wx.EVT_LIST_COL_CLICK wx.EVT_LIST_COL_RIGHT_CLICK wx.EVT_LiST_COL_END_DRAG
Methods of wx.ListEvent
.GetData() .GetKeyCode() .GetIndex() .GetItem() .GetImage() .GetMask() .GetPoint() .GetText()
class ListBox(parent, call=None, double=None)

Bases: wx._controls.ListBox

GetItemsFromData(data)
GetKey()
class ListCtrl(parent)

Bases: wx._controls.ListCtrl, wx.lib.mixins.listctrl.ListCtrlAutoWidthMixin

Lista básica.

InsertColumnInfoIcon(col, title)
OnInit()
class ListCtrlFiles(parent)

Bases: nabla.wx.widgets.list.ListCtrl, nabla.wx.widgets.mixins.list.ListCtrlPyDataMixin, nabla.wx.widgets.mixins.list.ListCtrlFilesSortMixin

AddFile(filename, icon=None)

Add the filenames to the list, and returns the item index

GetFileExtensionInfo(extension)
OnInit()
OnItemActivated(event)
SetPath(path='C:/')
columns = [u'Name', u'Path']
class xxFileList(parent, id=-1)

Bases: wx._controls.ListCtrl

Subclass of list control that shows a list of files with their file icons

add_file(filename)

Add the filenames to the list, and returns the item index

columns = [u'Name', u'Path']
get_image_id(extension)

Get the id in the image list for the extension. Will add the image if not there already

init_base(parent, id)

Put this in a method so we can subclass and override for testing

task Module

class TaskListCtrl(parent, *args, **kwargs)

Bases: wx.lib.agw.ultimatelistctrl.UltimateListCtrl, wx.lib.mixins.listctrl.ListCtrlAutoWidthMixin

InsertTask(title)
OnTaskEnd(event)
OnTaskStart(event)
OnTaskUpdate(event)
UpdateTask(title, info1='', info2='', bar=0)
class TaskRenderer(parent)

Bases: object

DONE_BITMAP = None
DrawHorizontalPipe(dc, x, y, w, colour)

Draws a horizontal 3D-looking pipe.

DrawProgressBar(dc, x, y, w, h, percent)

Draws a progress bar in the (x,y,w,h) box that represents a progress of ‘percent’. The progress bar is only horizontal and it’s height is constant (PIPE_HEIGHT). The ‘h’ parameter is used to vertically center the progress bar in the allotted space.

The drawing is speed-optimized. Two bitmaps are created the first time this function runs - one for the done (green) part of the progress bar and one for the remaining (white) part. During normal operation the function just cuts the necessary part of the two bitmaps and draws them.

DrawSubItem(dc, rect, line, highlighted, enabled)

Draw a custom progress bar using double buffering to prevent flicker

GetLineHeight()
GetSubItemWidth()
PIPE_HEIGHT = 16
PIPE_WIDTH = 2000
REMAINING_BITMAP = None
Update(title, info1, info2, bar)

tree Module

class TreeCtrl(parent, call=None, double=None, *args, **kwargs)

Bases: wx.lib.agw.customtreectrl.CustomTreeCtrl

OnInit()
SetItemFolder(item)
SetItemIcon(item, icon)
class TreeCtrl1(parent, call=None, double=None)

Bases: wx._controls.TreeCtrl

Contenidos

Tema anterior

2.4. Aplicaciones de escritorio

Próximo tema

lib Package

Esta página