AGW Logo

svn SVN Revision 68881 For gradientbutton

This file contains the SVN revision history for gradientbutton, at revision 68881.

Available information include commit date, the name of the committer, the file size, the SVN log messages and a diff from the previous version (if available).


file_info File Information

  • Commit Date: 17-Oct-2008 20:51:43 UTC
  • Committer: AG
  • File Size: 20134 byte(s)

svn_log Log Messages

The following log message was entered by the committer:

  • AGW: General overhaul of the documentation, much improved. All the widgets have their own sample usage in the docs as well;

  • FlatNotebook: Added the FNB_NAV_BUTTONS_WHEN_NEEDED style, which hides the navigation left/right arrows if all tabs fit;

  • RibbonBar: - Added the EVT_RIBBONBAR_TAB_LEFT_DCLICK event, which generates a special event

    when a ribbon bar tab is double-clicked;

    • Added support for toggle buttons;
    • Improved support for ribbon panel sizers: panels with sizers should now automatically minimise at small sizes, and behave properly when popping up from a minimised state;
    • Added tooltips via SetToolTip for those buttons which have the help_string attribute set.
  • XLSGrid: a new widget was added to AGW, termed XLSGrid. It’s based on wx.grid.Grid and can be used to faithfully reproduce the appearance of a Microsoft Excel spreadsheets.


svn_diff Diff To Previous Version (68362)

Version SVN diff:

--- wxPython/3rdParty/AGW/agw/gradientbutton.py     2011/07/24 21:36:47     68362
+++ wxPython/3rdParty/AGW/agw/gradientbutton.py     2011/08/25 16:40:17     68881
@@ -2,7 +2,7 @@
# GRADIENTBUTTON wxPython IMPLEMENTATION
#
# Andrea Gavana, @ 07 October 2008
-# Latest Revision: 27 Nov 2009, 17.00 GMT
+# Latest Revision: 17 Aug 2011, 15.00 GMT
#
#
# TODO List
@@ -23,16 +23,16 @@
# --------------------------------------------------------------------------------- #

"""
-GradientButton is another custom-drawn button class which mimics Windows CE mobile
+L{GradientButton} is another custom-drawn button class which mimics Windows CE mobile
gradient buttons.


Description
===========

-GradientButton is another custom-drawn button class which mimics Windows CE mobile
+L{GradientButton} is another custom-drawn button class which mimics Windows CE mobile
gradient buttons, using a tri-vertex blended gradient plus some ClearType bold
-font (best effect with Tahoma Bold). GradientButton supports:
+font (best effect with Tahoma Bold). L{GradientButton} supports:

* Triple blended gradient background, with customizable colours;
* Custom colours for the "pressed" state;
@@ -42,10 +42,46 @@
And a lot more. Check the demo for an almost complete review of the functionalities.


+Usage
+=====
+
+Usage example::
+
+    import wx
+    import wx.lib.agw.gradientbutton as GB
+
+    class MyFrame(wx.Frame):
+
+        def __init__(self, parent):
+
+            wx.Frame.__init__(self, parent, -1, "GradientButton Demo")
+
+            panel = wx.Panel(self, -1)
+
+            # One button without bitmap
+            button_1 = GB.GradientButton(panel, -1, None, "Hello World", (100, 50))
+
+            # One button with bitmap
+            my_bitmap = wx.Bitmap("my_bitmap.png", wx.BITMAP_TYPE_PNG)
+            button_2 = GB.GradientButton(panel, -1, my_bitmap, "GradientButton", (100, 150))
+
+
+    # our normal wxApp-derived class, as usual
+
+    app = wx.PySimpleApp()
+
+    frame = MyFrame(None)
+    app.SetTopWindow(frame)
+    frame.Show()
+
+    app.MainLoop()
+
+
+
Supported Platforms
===================

-GradientButton has been tested on the following platforms:
+L{GradientButton} has been tested on the following platforms:
* Windows (Windows XP).


@@ -70,9 +106,9 @@
License And Version
===================

-GradientButton is distributed under the wxPython license.
+L{GradientButton} is distributed under the wxPython license.

-Latest Revision: Andrea Gavana @ 27 Nov 2009, 17.00 GMT
+Latest Revision: Andrea Gavana @ 17 Aug 2011, 15.00 GMT

Version 0.3

@@ -624,6 +660,8 @@
"""
Overridden base class virtual. Determines the best size of the
button based on the label and bezel size.
+
+        :note: Overridden from `wx.PyControl`.
"""

label = self.GetLabel()
Tree