AGW Logo

svn SVN Revision 68881 For knobctrl

This file contains the SVN revision history for knobctrl, 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 19:15:31 UTC
  • Committer: AG
  • File Size: 25935 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/knobctrl.py   2011/07/24 21:36:47     68362
+++ wxPython/3rdParty/AGW/agw/knobctrl.py   2011/08/25 16:40:17     68881
@@ -2,7 +2,7 @@
# KNOBCTRL wxPython IMPLEMENTATION
#
# Andrea Gavana, @ 03 Nov 2006
-# Latest Revision: 14 Apr 2010, 12.00 GMT
+# Latest Revision: 17 Aug 2011, 15.00 GMT
#
#
# TODO List
@@ -22,13 +22,13 @@
# --------------------------------------------------------------------------------- #

"""
-KnobCtrl lets the user select a numerical value by rotating it.
+L{KnobCtrl} lets the user select a numerical value by rotating it.


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

-KnobCtrl lets the user select a numerical value by rotating it. It works like a
+L{KnobCtrl} lets the user select a numerical value by rotating it. It works like a
scrollbar: just set the ticks range property and read the value property in the
associated ``EVT_KC_ANGLE_CHANGING``/``EVT_KC_ANGLE_CHANGED`` events. Simple but
effective.
@@ -37,10 +37,57 @@
or similar functionalities.


+Usage
+=====
+
+Usage example::
+
+    import wx
+    import wx.lib.agw.knobctrl as KC
+
+    class MyFrame(wx.Frame):
+
+        def __init__(self, parent):
+
+            wx.Frame.__init__(self, parent, -1, "KnobCtrl Demo")
+
+            panel = wx.Panel(self)
+
+            knob1 = KC.KnobCtrl(panel, -1, size=(100, 100))
+            knob2 = KC.KnobCtrl(panel, -1, size=(100, 100))
+
+            knob1.SetTags(range(0, 151, 10))
+            knob1.SetAngularRange(-45, 225)
+            knob1.SetValue(45)
+
+            knob2.SetTags(range(0, 151, 10))
+            knob2.SetAngularRange(0, 270)
+            knob2.SetValue(100)
+
+            main_sizer = wx.BoxSizer(wx.VERTICAL)
+            main_sizer.Add(knob1, 0, wx.EXPAND|wx.ALL, 20)
+            main_sizer.Add(knob2, 0, wx.EXPAND|wx.ALL, 20)
+
+            panel.SetSizer(main_sizer)
+            main_sizer.Layout()
+
+
+    # our normal wxApp-derived class, as usual
+
+    app = wx.PySimpleApp()
+
+    frame = MyFrame(None)
+    app.SetTopWindow(frame)
+    frame.Show()
+
+    app.MainLoop()
+
+
+
Events
======

-KnobCtrl implements two events that can be intercepted by the user:
+L{KnobCtrl} implements two events that can be intercepted by the user:

- ``EVT_KC_ANGLE_CHANGING``;
- ``EVT_KC_ANGLE_CHANGED``.
@@ -52,7 +99,7 @@
Supported Platforms
===================

-KnobCtrl has been tested on the following platforms:
+L{KnobCtrl} has been tested on the following platforms:
* Windows (Windows XP);
* Linux Ubuntu (Dapper 6.06)

@@ -85,9 +132,9 @@
License And Version
===================

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

-Latest Revision: Andrea Gavana @ 14 Apr 2010, 12.00 GMT
+Latest Revision: Andrea Gavana @ 17 Aug 2011, 15.00 GMT

Version 0.3
Tree

Table Of Contents

Previous topic

SVN Revision 68362 For knobctrl

Next topic

labelbook