Module widgetlistbox :: Class WidgetListBox
[show private | hide private]
[frames | no frames]

Class WidgetListBox

MegaArchetype --+        
                |        
       MegaWidget --+    
                    |    
        ScrolledFrame --+
                        |
                       WidgetListBox


Class for displaying a list of custom widgets

Each widget must be an instance of WidgetListBoxItem (or a subclass)
Method Summary
  __init__(self, parent, *args, **kw)
  append(self, item)
Append an item to the end of the list
  clear(self)
  delete(self, idxOrItem)
Deletes an item from the end of the list
  get(self, first, last)
Similar to Pmw.ScrolledListBox.get()
  getcurselection(self)
See getvalue()
  getItemIndex(self, item)
Returns the 'index' with which the item is internally stored, or -1 if the item isn't known
  getvalue(self)
Returns a list of the currently selected items
  insert(self, idx, item)
Inserts an item at an arbitrary position within the list
  itemPackAndBind(self, item)
Pack the item and set its bindings
  on_click(self, ev)
Callback for mouse click events.
  on_deselect(self, item)
Callback which gets hit whenever an item gets deselected
  on_down(self, ev)
Callback for 'Down' key events.
  on_select(self, item)
Callback which gets hit whenever an item gets selected
  on_up(self, ev)
Callback for 'Up' key events.
  scrollDown(self, ev)
  scrollDownPage(self, ev)
  scrollTo(self, idx)
  scrollUp(self, ev)
  scrollUpPage(self, ev)
  selectItem(self, item)
Selects one item
  setlist(self, lst, **kw)
Toss all the items in the list, and replace them with a whole new list of items.
  setvalue(self, itemOrItems)
Sets the current selection for the WidgetListBox to itemOrItems
  size(self)
Returns the number of items in the list
    Inherited from ScrolledFrame
  destroy(self)
  interior(self)
  reposition(self)
  xview(self, mode, value, units)
  yview(self, mode, value, units)
  _getxview(self)
  _getyview(self)
  _horizflex(self)
  _hscrollMode(self)
  _reposition(self, event)
  _scrollBothNow(self)
  _toggleHorizScrollbar(self)
  _toggleVertScrollbar(self)
  _vertflex(self)
  _vscrollMode(self)
    Inherited from MegaWidget
  after(this, *args, **kw)
  after_cancel(this, *args, **kw)
  after_idle(this, *args, **kw)
  bbox(this, *args, **kw)
  bell(this, *args, **kw)
  bind(this, *args, **kw)
  bind_all(this, *args, **kw)
  bind_class(this, *args, **kw)
  bindtags(this, *args, **kw)
  clipboard_append(this, *args, **kw)
  clipboard_clear(this, *args, **kw)
  colormodel(this, *args, **kw)
  columnconfigure(this, *args, **kw)
  config(this, *args, **kw)
  deletecommand(this, *args, **kw)
  event_add(this, *args, **kw)
  event_delete(this, *args, **kw)
  event_generate(this, *args, **kw)
  event_info(this, *args, **kw)
  focus(this, *args, **kw)
  focus_displayof(this, *args, **kw)
  focus_force(this, *args, **kw)
  focus_get(this, *args, **kw)
  focus_lastfor(this, *args, **kw)
  focus_set(this, *args, **kw)
  forget(this, *args, **kw)
  getboolean(this, *args, **kw)
  getvar(this, *args, **kw)
  grab_current(this, *args, **kw)
  grab_release(this, *args, **kw)
  grab_set(this, *args, **kw)
  grab_set_global(this, *args, **kw)
  grab_status(this, *args, **kw)
  grid(this, *args, **kw)
  grid_bbox(this, *args, **kw)
  grid_columnconfigure(this, *args, **kw)
  grid_configure(this, *args, **kw)
  grid_forget(this, *args, **kw)
  grid_info(this, *args, **kw)
  grid_location(this, *args, **kw)
  grid_propagate(this, *args, **kw)
  grid_remove(this, *args, **kw)
  grid_rowconfigure(this, *args, **kw)
  grid_size(this, *args, **kw)
  grid_slaves(this, *args, **kw)
  image_names(this, *args, **kw)
  image_types(this, *args, **kw)
  info(this, *args, **kw)
  keys(this, *args, **kw)
  lift(this, *args, **kw)
  lower(this, *args, **kw)
  mainloop(this, *args, **kw)
  nametowidget(this, *args, **kw)
  option_add(this, *args, **kw)
  option_clear(this, *args, **kw)
  option_get(this, *args, **kw)
  option_readfile(this, *args, **kw)
  pack(this, *args, **kw)
  pack_configure(this, *args, **kw)
  pack_forget(this, *args, **kw)
  pack_info(this, *args, **kw)
  pack_propagate(this, *args, **kw)
  pack_slaves(this, *args, **kw)
  place(this, *args, **kw)
  place_configure(this, *args, **kw)
  place_forget(this, *args, **kw)
  place_info(this, *args, **kw)
  place_slaves(this, *args, **kw)
  propagate(this, *args, **kw)
  quit(this, *args, **kw)
  register(this, *args, **kw)
  rowconfigure(this, *args, **kw)
  selection_clear(this, *args, **kw)
  selection_get(this, *args, **kw)
  selection_handle(this, *args, **kw)
  selection_own(this, *args, **kw)
  selection_own_get(this, *args, **kw)
  send(this, *args, **kw)
  setvar(this, *args, **kw)
  slaves(this, *args, **kw)
  tk_bisque(this, *args, **kw)
  tk_focusFollowsMouse(this, *args, **kw)
  tk_focusNext(this, *args, **kw)
  tk_focusPrev(this, *args, **kw)
  tk_menuBar(this, *args, **kw)
  tk_setPalette(this, *args, **kw)
  tk_strictMotif(this, *args, **kw)
  tkraise(this, *args, **kw)
  unbind(this, *args, **kw)
  unbind_all(this, *args, **kw)
  unbind_class(this, *args, **kw)
  update(this, *args, **kw)
  update_idletasks(this, *args, **kw)
  wait_variable(this, *args, **kw)
  wait_visibility(this, *args, **kw)
  wait_window(this, *args, **kw)
  waitvar(this, *args, **kw)
  winfo_atom(this, *args, **kw)
  winfo_atomname(this, *args, **kw)
  winfo_cells(this, *args, **kw)
  winfo_children(this, *args, **kw)
  winfo_class(this, *args, **kw)
  winfo_colormapfull(this, *args, **kw)
  winfo_containing(this, *args, **kw)
  winfo_depth(this, *args, **kw)
  winfo_exists(this, *args, **kw)
  winfo_fpixels(this, *args, **kw)
  winfo_geometry(this, *args, **kw)
  winfo_height(this, *args, **kw)
  winfo_id(this, *args, **kw)
  winfo_interps(this, *args, **kw)
  winfo_ismapped(this, *args, **kw)
  winfo_manager(this, *args, **kw)
  winfo_name(this, *args, **kw)
  winfo_parent(this, *args, **kw)
  winfo_pathname(this, *args, **kw)
  winfo_pixels(this, *args, **kw)
  winfo_pointerx(this, *args, **kw)
  winfo_pointerxy(this, *args, **kw)
  winfo_pointery(this, *args, **kw)
  winfo_reqheight(this, *args, **kw)
  winfo_reqwidth(this, *args, **kw)
  winfo_rgb(this, *args, **kw)
  winfo_rootx(this, *args, **kw)
  winfo_rooty(this, *args, **kw)
  winfo_screen(this, *args, **kw)
  winfo_screencells(this, *args, **kw)
  winfo_screendepth(this, *args, **kw)
  winfo_screenheight(this, *args, **kw)
  winfo_screenmmheight(this, *args, **kw)
  winfo_screenmmwidth(this, *args, **kw)
  winfo_screenvisual(this, *args, **kw)
  winfo_screenwidth(this, *args, **kw)
  winfo_server(this, *args, **kw)
  winfo_toplevel(this, *args, **kw)
  winfo_viewable(this, *args, **kw)
  winfo_visual(this, *args, **kw)
  winfo_visualid(this, *args, **kw)
  winfo_visualsavailable(this, *args, **kw)
  winfo_vrootheight(this, *args, **kw)
  winfo_vrootwidth(this, *args, **kw)
  winfo_vrootx(this, *args, **kw)
  winfo_vrooty(this, *args, **kw)
  winfo_width(this, *args, **kw)
  winfo_x(this, *args, **kw)
  winfo_y(this, *args, **kw)
    Inherited from MegaArchetype
  __getitem__(self, option)
  __setitem__(self, key, value)
  __str__(self)
  addoptions(self, optionDefs)
  cget(self, option)
  component(self, name)
  componentaliases(self)
  componentgroup(self, name)
  components(self)
  configure(self, option, **kw)
  createcomponent(self, componentName, componentAliases, componentGroup, widgetClass, *widgetArgs, **kw)
  createlabel(self, parent, childCols, childRows)
  defineoptions(self, keywords, optionDefs, dynamicGroups)
  destroycomponent(self, name)
  hulldestroyed(self)
  initialiseoptions(self, dummy)
  isinitoption(self, option)
  options(self)

Method Details

append(self, item)

Append an item to the end of the list

Arguments:
  • item - the item to append - must be instance of WidgetListBoxItem or subclass
Returns:
  • the item appended, for your convenience, to let you use this method 'on the fly'

delete(self, idxOrItem)

Deletes an item from the end of the list

Arguments:
  • idxOrItem - either a ref to an item currently on the list, or the 'index' of the item within the list

get(self, first=None, last=None)

Similar to Pmw.ScrolledListBox.get()

Retrieves one, some or all the items in the list. Note that the items returned are widget refs

Arguments:
  • first - index of first item to get. Omit to get all items
  • last - index of last item to get. Omit to get just one item

getcurselection(self)

See getvalue()

getItemIndex(self, item)

Returns the 'index' with which the item is internally stored, or -1 if the item isn't known

getvalue(self)

Returns a list of the currently selected items

insert(self, idx, item)

Inserts an item at an arbitrary position within the list

Arguments:
  • idx - index at which to insert the item, or -1 to append to end
  • item - the item to insert - must be instance of WidgetListBoxItem or subclass
Returns:
  • the item appended, for your convenience, to let you use this method 'on the fly'

itemPackAndBind(self, item)

Pack the item and set its bindings

on_click(self, ev)

Callback for mouse click events. You likely won't need to override this.

on_deselect(self, item)

Callback which gets hit whenever an item gets deselected

Override as desired

on_down(self, ev)

Callback for 'Down' key events. You likely won't need to override this.

on_select(self, item)

Callback which gets hit whenever an item gets selected

Override as desired

on_up(self, ev)

Callback for 'Up' key events. You likely won't need to override this.

selectItem(self, item)

Selects one item

Arguments:
  • item - either an index on the list, or a ref to one of the items on the list. Set to -1 to deselect all

setlist(self, lst, **kw)

Toss all the items in the list, and replace them with a whole new list of items.

Each element of lst must be an instance of WidgetListBoxItem (or subclass)

setvalue(self, itemOrItems)

Sets the current selection for the WidgetListBox to itemOrItems

Argument:
  • itemOrItems - either a single item (instance of WidgetListBoxItem or subclass), or a sequence of such

size(self)

Returns the number of items in the list
Overrides:
Pmw.MegaWidget.size

Generated by Epydoc 2.0 on Sat Nov 29 23:55:25 2003 http://epydoc.sf.net