AGW Logo

svn SVN Revision 68881 For rulerctrl

This file contains the SVN revision history for rulerctrl, 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: 55645 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/rulerctrl.py  2011/07/24 21:36:47     68362
+++ wxPython/3rdParty/AGW/agw/rulerctrl.py  2011/08/25 16:40:17     68881
@@ -2,7 +2,7 @@
# RULERCTRL wxPython IMPLEMENTATION
#
# Andrea Gavana, @ 03 Nov 2006
-# Latest Revision: 01 Dec 2009, 09.00 GMT
+# Latest Revision: 17 Aug 2011, 15.00 GMT
#
#
# TODO List
@@ -22,18 +22,18 @@
# --------------------------------------------------------------------------------- #

"""
-RulerCtrl implements a ruler window that can be placed on top, bottom, left or right
+L{RulerCtrl} implements a ruler window that can be placed on top, bottom, left or right
to any wxPython widget.


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

-RulerCtrl implements a ruler window that can be placed on top, bottom, left or right
+L{RulerCtrl} implements a ruler window that can be placed on top, bottom, left or right
to any wxPython widget. It is somewhat similar to the rulers you can find in text
editors software, though not so powerful.

-RulerCtrl has the following characteristics:
+L{RulerCtrl} has the following characteristics:

- Can be horizontal or vertical;
- 4 built-in formats: integer, real, time and linearDB formats;
@@ -53,10 +53,62 @@
And a lot more. See the demo for a review of the functionalities.


+Usage
+=====
+
+Usage example::
+
+    import wx
+    import wx.lib.agw.rulerctrl as RC
+
+    class MyFrame(wx.Frame):
+
+        def __init__(self, parent):
+
+            wx.Frame.__init__(self, parent, -1, "RulerCtrl Demo")
+
+            panel = wx.Panel(self)
+
+            text = wx.TextCtrl(panel, -1, "Hello World! wxPython rules", style=wx.TE_MULTILINE)
+
+            ruler1 = RC.RulerCtrl(panel, -1, orient=wx.HORIZONTAL, style=wx.SUNKEN_BORDER)
+            ruler2 = RC.RulerCtrl(panel, -1, orient=wx.VERTICAL, style=wx.SUNKEN_BORDER)
+
+            mainsizer = wx.BoxSizer(wx.HORIZONTAL)
+            leftsizer = wx.BoxSizer(wx.VERTICAL)
+            bottomleftsizer = wx.BoxSizer(wx.HORIZONTAL)
+            topsizer = wx.BoxSizer(wx.HORIZONTAL)
+
+            leftsizer.Add((20, 20), 0, wx.ADJUST_MINSIZE, 0)
+            topsizer.Add((39, 0), 0, wx.ADJUST_MINSIZE, 0)
+            topsizer.Add(ruler1, 1, wx.EXPAND, 0)
+            leftsizer.Add(topsizer, 0, wx.EXPAND, 0)
+
+            bottomleftsizer.Add((10, 0))
+            bottomleftsizer.Add(ruler2, 0, wx.EXPAND, 0)
+            bottomleftsizer.Add(text, 1, wx.EXPAND, 0)
+            leftsizer.Add(bottomleftsizer, 1, wx.EXPAND, 0)
+            mainsizer.Add(leftsizer, 3, wx.EXPAND, 0)
+
+            panel.SetSizer(mainsizer)
+
+
+    # our normal wxApp-derived class, as usual
+
+    app = wx.PySimpleApp()
+
+    frame = MyFrame(None)
+    app.SetTopWindow(frame)
+    frame.Show()
+
+    app.MainLoop()
+
+
+
Events
======

-RulerCtrl implements the following events related to indicators:
+L{RulerCtrl} implements the following events related to indicators:

- ``EVT_INDICATOR_CHANGING``: the user is about to change the position of one indicator;
- ``EVT_INDICATOR_CHANGED``: the user has changed the position of one indicator.
@@ -65,7 +117,7 @@
Supported Platforms
===================

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

@@ -92,9 +144,9 @@
License And Version
===================

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

-Latest Revision: Andrea Gavana @ 01 Dec 2009, 09.00 GMT
+Latest Revision: Andrea Gavana @ 17 Aug 2011, 15.00 GMT

Version 0.3

@@ -496,7 +548,7 @@

class RulerCtrl(wx.PyPanel):
"""
-    RulerCtrl implements a ruler window that can be placed on top, bottom, left or right
+    L{RulerCtrl} implements a ruler window that can be placed on top, bottom, left or right
to any wxPython widget. It is somewhat similar to the rulers you can find in text
editors software, though not so powerful.
"""
Tree

Table Of Contents

Previous topic

SVN Revision 68362 For rulerctrl

Next topic

shapedbutton