Does anyone use DocView within wxPython?

Does anyone use the wx DocView architecture within their wxPython
application?

Does anyone have an example of making use of it and of the command
handling?

I've looked through the docview example that comes with wxWidgets, but
it's not that helpful for seeing how to make things happen in python.

Regards,

Phillip

···

------------------------------------------------------------------------
Phillip Piper <http://www.bigfoot.com/~phillip_piper>
www.bigfoot.com/~phillip_piper <mailto:phillip_piper@bigfoot.com>
phillip_piper@bigfoot.com
A man's life does not consist in the abundance of his possessions

have you looked at:
http://home.pacbell.net/pyared/pybypy/docview/
?

···

On Wed, 7 Apr 2004 20:22:53 +0200, Phillip Piper <phillip_piper@bigfoot.com> wrote:

Does anyone use the wx DocView architecture within their wxPython
application?

Does anyone have an example of making use of it and of the command
handling?

I've looked through the docview example that comes with wxWidgets, but
it's not that helpful for seeing how to make things happen in python.

Regards,

Phillip

--
Peter Damoc
Hacker Wannabe
http://www.sigmacore.net/about.html

Hello,
I'm trying to change the right panel of a SplitterWindow when I select the root of a TreeCtrl that is in the left panel of my SplitPane.

My function bind to the event EVT_TREE_SEL_CHANGED is this one :

def OnSelChanged(self, event):
     item = event.GetItem()
     if item == self.root:
         newDefPanel = DefinitionForm(self.parent, -1)
         self.parent.ReplaceWindow(self.parent.GetWindow2(),newDefPanel)
         self.parent.GetWindow2().setDefinition()

When I do this, the left panel is also modified, that is the left panel has the same image as the right panel.

When I replace "if item == self.root:" by "if item is self.root:', the view is correct but I don't obtain anything when I select the root in my left panel.

Does anyone has an idea ?

Thomas Zuliani

PS : I'm still learning and I'm french

do you assign the "self.root"? I don't think the TreeCtrl has such an atribute.
Maybe try:
item = event.GetItem()
if item is self.GetRootItem():
  ...

···

On Wed, 05 May 2004 17:26:22 +0200, ZULIANI Thomas <thomas.zuliani@crf.canon.fr> wrote:

Hello,
I'm trying to change the right panel of a SplitterWindow when I select the root of a TreeCtrl that is in the left panel of my SplitPane.

My function bind to the event EVT_TREE_SEL_CHANGED is this one :

def OnSelChanged(self, event):
     item = event.GetItem()
     if item == self.root:
         newDefPanel = DefinitionForm(self.parent, -1)
         self.parent.ReplaceWindow(self.parent.GetWindow2(),newDefPanel)
         self.parent.GetWindow2().setDefinition()

When I do this, the left panel is also modified, that is the left panel has the same image as the right panel.

When I replace "if item == self.root:" by "if item is self.root:', the view is correct but I don't obtain anything when I select the root in my left panel.

Does anyone has an idea ?

Thomas Zuliani

PS : I'm still learning and I'm french

--
Peter Damoc
Hacker Wannabe

ZULIANI Thomas wrote:

Hello,
I'm trying to change the right panel of a SplitterWindow when I select the root of a TreeCtrl that is in the left panel of my SplitPane.

My function bind to the event EVT_TREE_SEL_CHANGED is this one :

def OnSelChanged(self, event):
    item = event.GetItem()
    if item == self.root:
        newDefPanel = DefinitionForm(self.parent, -1) self.parent.ReplaceWindow(self.parent.GetWindow2(),newDefPanel)
        self.parent.GetWindow2().setDefinition()

When I do this, the left panel is also modified, that is the left panel has the same image as the right panel.

Actually, it is probably the old window2 that still exists. Try this:

  newDefPanel = DefinitionForm(self.parent, -1)
  old = self.parent.GetWindow2()
  old.Hide()
  self.parent.ReplaceWindow(old, newDefPanel)
  old.Destroy()

···

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

Actually, it is probably the old window2 that still exists. Try this:

>
> newDefPanel = DefinitionForm(self.parent, -1)
> old = self.parent.GetWindow2()
> old.Hide()
> self.parent.ReplaceWindow(old, newDefPanel)
> old.Destroy()

> --
> Robin Dunn
> Software Craftsman
> http://wxPython.org Java give you jitters? Relax with wxPython!

Thanks Robin, you were true !

Thomas Zuliani