Differences between revisions 3 and 4
Revision 3 as of 2006-01-02 11:04:53
Size: 1727
Editor: 151
Comment:
Revision 4 as of 2008-03-11 10:50:27
Size: 1731
Editor: localhost
Comment: converted to 1.6 markup
Deletions are marked like this. Additions are marked like this.
Line 32: Line 32:
http://www.sigmacore.net/andrea/images/ExtendedChoice.jpg {{http://www.sigmacore.net/andrea/images/ExtendedChoice.jpg}}

The idea of an ExtendedChoice implementation that is (hopefully) portable to all platforms supported by wxPython is interesting. Windows already have this kind of feature.

ExtendedChoice is built using 4 different controls:

  • A wx.StaticBitmap to handle the icons;

  • A wx.lib.stattext.StaticText to simulate the behavior of a wx.TextCtrl (which does not line up correctly in a sizer if you use the wx.NO_BORDER style for it);

  • A wx.lib.buttons.GenBitmapButton to simulate the wx.Choice/wx.ComboBox button;

  • A wx.Dialog (to replace a wx.PopupTransientWindow) with a wx.VListBox inside to simulate the behavior of wx.Choice/wx.ComboBox expanded choice list.

What It Can Do:

  • Behaves like wx.Choice or wx.ComboBox in handling Char/Key events;

  • Set the whole control colour or change it in runtime;
  • Set most Background/Foreground colour for choices, Background/Foreground
  • Motifs/Styles, text colour and text selection colour;
  • Set or change in runtime font associated to each or all the choices;
  • Depending On The Class Construction (EC_RULES Style), You Can Have Borders And Customize Them;
  • Sort ascending/descending the choices;
  • Add or remove choices from the choice-list;
  • Add icons/images in runtime to the wx.ImageList associated to the control;

  • Change the order in which icons and choices are associated (change icon for an already present choice);
  • Replace choices with other user-defined strings/labels.

Downloads, screenshots, demo and more info can be found at:

http://xoomer.virgilio.it/infinity77/eng/freeware.html#extendedchoice

OR:

http://sigmacore.net/andrea/?page_id=2

http://www.sigmacore.net/andrea/images/ExtendedChoice.jpg

Andrea.

ExtendedChoice (last edited 2008-03-11 10:50:27 by localhost)

NOTE: To edit pages in this wiki you must be a member of the TrustedEditorsGroup.