[wxPython] wxPropertyListView and other Property classes

Robin,
are you planning on adding wxPropertyListView and the other Property classes
to wxPython? I was planning on writing something for PythonCard when I redo
the current Property Editor UI, but using a standard wxPython control that I
can subclass would probably be superior to rolling my own solution.

I didn't even know wxWindows had them until someone posted about them on
wx-users today. Boa has its own property editor, but if I remember
correctly, Riaan's code is tied pretty closely to the rest of Boa.

ka

I've got the beginnings of a property editor (using Python 2.2 properties). It provides a fairly generic and extensible framework for building both single-object and multi-object property editors.

It allows both in-cell editors (normal grid-cell editors) and pop-up windows (with base classes which handles most of the work of creating those windows).

Is part of my basicproperty package, available at:
  http://members.rogers.com/mcfletch/programming/

This isn't the standard wxWindows stuff, of course, but oh well, I think it's a rather decent approach.

Enjoy,
Mike

Kevin Altis wrote:

···

Robin,
are you planning on adding wxPropertyListView and the other Property classes
to wxPython? I was planning on writing something for PythonCard when I redo
the current Property Editor UI, but using a standard wxPython control that I
can subclass would probably be superior to rolling my own solution.

I didn't even know wxWindows had them until someone posted about them on
wx-users today. Boa has its own property editor, but if I remember
correctly, Riaan's code is tied pretty closely to the rest of Boa.

ka

_______________________________________________
wxpython-users mailing list
wxpython-users@lists.wxwindows.org
http://lists.wxwindows.org/mailman/listinfo/wxpython-users

--
_______________________________________
   Mike C. Fletcher
   http://members.rogers.com/mcfletch/

are you planning on adding wxPropertyListView and the other Property

classes

to wxPython?

No definite plans but I can add it to the todo list. On the other hand,
this may be the type of thing that a better solution could be done in Python
and added to the wxPython.lib package. Any takers?

···

--
Robin Dunn
Software Craftsman
robin@AllDunn.com Java give you jitters?
http://wxPython.org Relax with wxPython!

I guess I'm a taker on this one :slight_smile: .

(See also previous post in reply to the thread.) I already have the (working) basics of a property-based property-value-editing system. Below are some details...

Object Schema:

PropertyView (versions for single objects or multiple)
  - PropertyTable (wxPyGridTable with support for accessing object properties for populating the property table)
   - PropertySet (holder for a set of property definitions, you could use different property sets to provide different views of a given object. Eventually you could allow the property set's definition collection to be edited by the user, thereby re-configuring a view (think the "edit columns" functions you see in Outlook, Mozilla, etceteras))
    - PropertyDefinition(s)
     - property object (get/set functionality)
     - ViewClass (doesn't work with wxPython 2.3.2 due to bug that's already fixed in CVS, but not yet propagated)
     - EditClass
     - (planned) sort/iterate functionality (click on property title to sort by property value)
   - object / collection with which we're working

If Python < 2.2 compatability is a serious concern, I (or someone) could create a version that doesn't use property objects in the PropertyDefinition(s) etc. All-in-all, Python < 2.2 is not something I care about for myself, but I might be willing to work on once I've got everything else finished (whenever that might occur), but I'd really expect that I'll spend my time elsewhere for the forseeable future.

The current EditClass set is rather small:
  calendar (wxCalendar control in a pop-up-like window, edits mxDateTime values),
  single choice from given set of objects (drop-down list in-cell),
  multiple choice from given set of objects (drag-and-drop list controls in pop-up),
  colour choice from pallette (currently using wxpycolours, could use other controls with little problem, pop-up),
  long-text editor (wxTextCtrl in pop-up),
  time-of-day (h:m in-cell editor),
  and the standard in-cell string editor.

The pop-up functionality is done with an "edit" button in the cell, other approaches didn't work well with the grid when I tried them.

Eventually I'm intending to include generic collection-editing mechanisms (add,reorder, delete) so that you can take a property collection view and use them to automatically edit nested hierarchies of objects.

General philosophy is to:
  make everything object-oriented (that is, you edit Python objects, you don't translate into particular data types (which requires wrapping controls sometimes)),
  provide a decent pallette of editors/viewers so that the end-developer can often just specify a standard editor for their property,
  notwithstanding the last point, make creating new editors/viewers easy, so that developers can make a professional-looking UI when using the property editor classes.

If there is interest, I can check the package into a new project on SourceForge and add other developers in.

Enjoy yourselves,
Mike

Robin Dunn wrote:

are you planning on adding wxPropertyListView and the other Property

classes

to wxPython?

No definite plans but I can add it to the todo list. On the other hand,
this may be the type of thing that a better solution could be done in Python
and added to the wxPython.lib package. Any takers?

...

I guess I'm a taker on this one :slight_smile: .

See how easy it is? I bait the hook and toss it into the pond and catch a
developer! <wink>

If Python < 2.2 compatability is a serious concern, I (or someone) could
create a version that doesn't use property objects in the
PropertyDefinition(s) etc. All-in-all, Python < 2.2 is not something I
care about for myself, but I might be willing to work on once I've got
everything else finished (whenever that might occur), but I'd really
expect that I'll spend my time elsewhere for the forseeable future.

I think being able to go back to Python 2.0 and not being specifically tied
to Python properties would be nice. For example, using a property editor on
a dictionary of values would be useful.

Other than that it sounds nice.

···

--
Robin Dunn
Software Craftsman
robin@AllDunn.com Java give you jitters?
http://wxPython.org Relax with wxPython!