AGW Logo

agw_title ThumbnailCtrl

ThumbnailCtrl is a widget that can be used to display a series of images in a “thumbnail” format.

hierarchy Inheritance Diagram

Inheritance diagram for: ThumbnailCtrl

Inheritance diagram of ThumbnailCtrl


appearance Control Appearance


ThumbnailCtrl

ThumbnailCtrl


method_summary Methods Summary

__init__Default class constructor.
GetShowComboBoxReturns whether the folder combobox is shown.
OnComboBoxHandles the wx.EVT_COMBOBOX for the folder combobox.
RecreateComboBoxRecreates the folder combobox every time a new directory is explored.
ShowComboBoxShows/Hide the top folder wx.ComboBox.

API Class API

class ThumbnailCtrl(wx.Panel)[source]

ThumbnailCtrl is a widget that can be used to display a series of images in a “thumbnail” format.



__init__(parent, id=wx.ID_ANY, pos=wx.DefaultPosition, size=wx.DefaultSize, thumboutline=THUMB_OUTLINE_IMAGE, thumbfilter=THUMB_FILTER_IMAGES, imagehandler=PILImageHandler)[source]

Default class constructor.

Parameters:
  • parent – parent window. Must not be None;
  • id – window identifier. A value of -1 indicates a default value;
  • pos – the control position. A value of (-1, -1) indicates a default position, chosen by either the windowing system or wxPython, depending on platform;
  • size – the control size. A value of (-1, -1) indicates a default size, chosen by either the windowing system or wxPython, depending on platform;
  • thumboutline – outline style for ThumbnailCtrl, which may be:


    Outline Flag Value Description
    THUMB_OUTLINE_NONE 0 No outline is drawn on selection
    THUMB_OUTLINE_FULL 1 Full outline (image+caption) is drawn on selection
    THUMB_OUTLINE_RECT 2 Only thumbnail bounding rectangle is drawn on selection (default)
    THUMB_OUTLINE_IMAGE 4 Only image bounding rectangle is drawn.
  • thumbfilter – filter for image/video/audio files. Actually only THUMB_FILTER_IMAGES is implemented;
  • imagehandler – can be PILImageHandler if PIL is installed (faster), or NativeImageHandler which only uses wxPython image methods.


GetShowComboBox()[source]

Returns whether the folder combobox is shown.



OnComboBox(event)[source]

Handles the wx.EVT_COMBOBOX for the folder combobox.

Parameters:event – a wx.CommandEvent event to be processed.


RecreateComboBox(newdir)[source]

Recreates the folder combobox every time a new directory is explored.

Parameters:newdir – the new folder to be explored.


ShowComboBox(show=True)[source]

Shows/Hide the top folder wx.ComboBox.

Parameters:showTrue to show the combobox, False otherwise.
Tree

Table Of Contents

Previous topic

Thumb

Next topic

ThumbnailEvent