Package wx :: Class ListCtrl
[frames | no frames]

Type ListCtrl

object --+                
         |                
    Object --+            
             |            
    EvtHandler --+        
                 |        
            Window --+    
                     |    
               Control --+
                         |
                        ListCtrl

Known Subclasses:
LanguageListCtrl, ListView

Proxy of C++ ListCtrl class


Method Summary
Control __init__(self, parent, id, pos, size, style, validator, name)
Create a Control.
  Append(self, entry)
Append an item to the list control.
bool Arrange(self, flag)
  AssignImageList(self, imageList, which)
  ClearAll(self)
  ClearColumnImage(self, col)
bool Create(self, parent, id, pos, size, style, validator, name)
Do the 2nd phase and create the GUI control.
bool DeleteAllColumns(self)
bool DeleteAllItems(self)
bool DeleteColumn(self, col)
bool DeleteItem(self, item)
  EditLabel(self, item)
bool EnsureVisible(self, item)
long FindItem(self, start, str, partial)
long FindItemAtPos(self, start, pt, direction)
long FindItemData(self, start, data)
  Focus(self, idx)
Focus and show the given item
VisualAttributes GetClassDefaultAttributes(variant)
Get the default attributes for this class. (Static method)
ListItem GetColumn(self, col)
int GetColumnCount(self)
int GetColumnWidth(self, col)
int GetCountPerPage(self)
TextCtrl GetEditControl(self)
  GetFirstSelected(self, *args)
return first selected item, or -1 when none
  GetFocusedItem(self)
get the currently focused item or -1 if none
ImageList GetImageList(self, which)
ListItem GetItem(self, itemId, col)
Colour GetItemBackgroundColour(self, item)
int GetItemCount(self)
long GetItemData(self, item)
Font GetItemFont(self, item)
Point GetItemPosition(self, item)
Rect GetItemRect(self, item, code)
  GetItemSpacing(*args, **kwargs)
<function GetItemSpacing at 0xb79cc1b4> is deprecated
int GetItemState(self, item, stateMask)
String GetItemText(self, item)
Colour GetItemTextColour(self, item)
Window GetMainWindow(self)
long GetNextItem(self, item, geometry, state)
  GetNextSelected(self, item)
return subsequent selected items, or -1 when no more
int GetSelectedItemCount(self)
Colour GetTextColour(self)
long GetTopItem(self)
Rect GetViewRect(self)
(item, where) HitTest(point)
in the second return value (see wx.LIST_HITTEST flags.)
(item, where, subItem) HitTestSubItem(point)
Determines which item (if any) is at the specified point, giving in the second return value (see wx.LIST_HITTEST flags) and also the subItem, if any.
bool InReportView(self)
long InsertColumn(self, col, heading, format, width)
long InsertColumnInfo(self, col, info)
long InsertColumnItem(self, col, info)
long InsertImageItem(self, index, imageIndex)
long InsertImageStringItem(self, index, label, imageIndex)
long InsertItem(self, info)
long InsertStringItem(self, index, label, imageIndex)
  IsSelected(self, idx)
return True if the item is selected
bool IsVirtual(self)
  RefreshItem(self, item)
  RefreshItems(self, itemFrom, itemTo)
bool ScrollList(self, dx, dy)
  Select(self, idx, on)
[de]select an item
bool SetColumn(self, col, item)
  SetColumnImage(self, col, image)
bool SetColumnWidth(self, col, width)
  SetImageList(self, imageList, which)
bool SetItem(self, info)
  SetItemBackgroundColour(self, item, col)
bool SetItemColumnImage(self, item, column, image)
  SetItemCount(self, count)
bool SetItemData(self, item, data)
  SetItemFont(self, item, f)
bool SetItemImage(self, item, image, selImage)
bool SetItemPosition(self, item, pos)
  SetItemSpacing(*args, **kwargs)
<function SetItemSpacing at 0xb79cc224> is deprecated
bool SetItemState(self, item, state, stateMask)
  SetItemText(self, item, str)
  SetItemTextColour(self, item, col)
  SetSingleStyle(self, style, add)
long SetStringItem(self, index, col, label, imageId)
  SetTextColour(self, col)
bool SortItems(self, func)

Property Summary
  ColumnCount: See GetColumnCount
  CountPerPage: See GetCountPerPage
  EditControl: See GetEditControl
  FocusedItem: See GetFocusedItem
  ItemCount: See GetItemCount and SetItemCount
  MainWindow: See GetMainWindow
  SelectedItemCount: See GetSelectedItemCount
  TextColour: See GetTextColour and SetTextColour
  thisown: The membership flag
  TopItem: See GetTopItem
  ViewRect: See GetViewRect

Instance Method Details

__init__(self, parent, id=-1, pos=DefaultPosition, size=DefaultSize, style=LC_ICON, validator=DefaultValidator, name=ListCtrlNameStr)
(Constructor)

Create a Control. Normally you should only call this from a subclass' __init__ as a plain old wx.Control is not very useful.

Parameters:
parent
           (type=Window)

id
           (type=int)

pos
           (type=Point)

size
           (type=Size)

style
           (type=long)

validator
           (type=Validator)

name
           (type=String)

Returns:
Control
Overrides:
wx.Control.__init__ (inherited documentation)

Append(self, entry)

Append an item to the list control. The entry parameter should be a sequence with an item for each column

Create(self, parent, id=-1, pos=DefaultPosition, size=DefaultSize, style=LC_ICON, validator=DefaultValidator, name=ListCtrlNameStr)

Do the 2nd phase and create the GUI control.

Parameters:
parent
           (type=Window)

id
           (type=int)

pos
           (type=Point)

size
           (type=Size)

style
           (type=long)

validator
           (type=Validator)

name
           (type=String)

Returns:
bool
Overrides:
wx.Control.Create

Focus(self, idx)

Focus and show the given item

GetFirstSelected(self, *args)

return first selected item, or -1 when none

GetFocusedItem(self)

get the currently focused item or -1 if none

GetItemSpacing(*args, **kwargs)

<function GetItemSpacing at 0xb79cc1b4> is deprecated

GetNextSelected(self, item)

return subsequent selected items, or -1 when no more

HitTest(point)

Determines which item (if any) is at the specified point, giving
in the second return value (see wx.LIST_HITTEST flags.)
Parameters:
point
           (type=Point)

Returns:
(item, where)
Overrides:
wx.Window.HitTest

HitTestSubItem(point)

Determines which item (if any) is at the specified point, giving in the second return value (see wx.LIST_HITTEST flags) and also the subItem, if any.

Parameters:
point
           (type=Point)

Returns:
(item, where, subItem)

IsSelected(self, idx)

return True if the item is selected

Select(self, idx, on=1)

[de]select an item

SetItemSpacing(*args, **kwargs)

<function SetItemSpacing at 0xb79cc224> is deprecated


Static Method Details

GetClassDefaultAttributes(variant=WINDOW_VARIANT_NORMAL)

Get the default attributes for this class. This is useful if you want to use the same font or colour in your own control as in a standard control -- which is a much better idea than hard coding specific colours or fonts which might look completely out of place on the user's system, especially if it uses themes.

The variant parameter is only relevant under Mac currently and is ignore under other platforms. Under Mac, it will change the size of the returned font. See wx.Window.SetWindowVariant for more about this.

Parameters:
variant
           (type=int)

Returns:
VisualAttributes

Property Details

ColumnCount

See GetColumnCount

Get Method:
GetColumnCount(self)

CountPerPage

See GetCountPerPage

Get Method:
GetCountPerPage(self)

EditControl

See GetEditControl

Get Method:
GetEditControl(self)

FocusedItem

See GetFocusedItem

Get Method:
GetFocusedItem(self)

ItemCount

See GetItemCount and SetItemCount

Get Method:
GetItemCount(self)
Set Method:
SetItemCount(self, count)

MainWindow

See GetMainWindow

Get Method:
GetMainWindow(self)

SelectedItemCount

See GetSelectedItemCount

Get Method:
GetSelectedItemCount(self)

TextColour

See GetTextColour and SetTextColour

Get Method:
GetTextColour(self)
Set Method:
SetTextColour(self, col)

thisown

The membership flag

TopItem

See GetTopItem

Get Method:
GetTopItem(self)

ViewRect

See GetViewRect

Get Method:
GetViewRect(self)

Generated by Epydoc 2.1.20050511.rpd on Thu Mar 22 12:08:34 2007 http://epydoc.sf.net