CustomTreeCtrl Hyperlink

Hi Mark,

Here is some example code where if you click on a hyperlink and then
click on the exact same one, you will only get one event:

Sorry for the late reply. It's a bug, I will fix it (together with all
the other bugs and feature requests for CustomTreeCtrl) for the next
pre-release. I'll commit the new version to SVN as soon as I can get
the issue of Ctrl+Enter solved.

Thank you for the bug report.

Andrea.

"Imagination Is The Only Weapon In The War Against Reality."
http://xoomer.alice.it/infinity77/

···

On Dec 17, 2007 11:45 PM, Mark Guagenti wrote:

No problem, thanks for looking into it.
--Mark

···

On 12/18/07, Andrea Gavana <andrea.gavana@gmail.com> wrote:

Hi Mark,

On Dec 17, 2007 11:45 PM, Mark Guagenti wrote:
> Here is some example code where if you click on a hyperlink and then
> click on the exact same one, you will only get one event:

Sorry for the late reply. It's a bug, I will fix it (together with all
the other bugs and feature requests for CustomTreeCtrl) for the next
pre-release. I'll commit the new version to SVN as soon as I can get
the issue of Ctrl+Enter solved.

Thank you for the bug report.

Andrea.

"Imagination Is The Only Weapon In The War Against Reality."
http://xoomer.alice.it/infinity77/

---------------------------------------------------------------------
To unsubscribe, e-mail: wxPython-users-unsubscribe@lists.wxwidgets.org
For additional commands, e-mail: wxPython-users-help@lists.wxwidgets.org

Hi All,

    I have done some modifications to CustomTreeCtrl, including:

- Fixed a bug with hypertext items not getting click event more than
once if selected;
- Substituted wx.TextCtrl with ExpandoTextCtrl to handle in a nicer
way multiline items;
- Now editing multiline items works as expected: use Shift+Enter to
enter a newline character for a multiline item;
- CustomTreeCtrl with wx.TR_FULL_ROW_HIGHLIGHT now selects items when
the user clicks anywhere inside the item row and not only on the item
rect.

If is there someone willing to test the new code, you can find it here:

http://svn.wxwidgets.org/viewvc/wx/wxPython/trunk/wx/lib/customtreectrl.py?sortby=date&view=log

Otherwise it should be available for the next release. I would be
grateful if someone could do a bit of testing to find out if I did
stupid things in the new version.

Thank you very much.

Andrea.

"Imagination Is The Only Weapon In The War Against Reality."
http://xoomer.alice.it/infinity77/

Andrea,
    I'm giving it a go now and it's working great. Good work!
I absolutely love the full row select when using TR_FULL_ROW_HIGHLIGHT.
I tested the hyperlinks issue as well and it seems to be resolved.

There are 3 things I would like to point out that I noticed. With the
full row select, you can't select the row if you've clicked on the left
side of the expand/collapse button. That may be a good thing though
since that doesn't seem like a normal user behavior to click over there.

Secondly, it's kind of hard to see the edit control when editing labels,
does it need a border? See screenshot.

Lastly, I seem to be having a small problem with editing labels. When
you press enter to accept the changes, if your cursor is not at the end
of the text, it will insert a newline character. See code below.

Keep up the good work! I greatly appreciate your efforts!

-Kyle Rickey

import wx
import wx.lib.customtreectrl as CT

class MainWindow(wx.Frame):
  def __init__(self, parent, id, title):
    wx.Frame.__init__(self, parent, wx.ID_ANY, title)
    self.tree = CT.CustomTreeCtrl(self, -1,
  
style=wx.TR_DEFAULT_STYLE|wx.TR_HAS_BUTTONS|
  
wx.TR_FULL_ROW_HIGHLIGHT|wx.TR_MULTIPLE|wx.TR_EDIT_LABELS|
  
wx.TR_HAS_VARIABLE_ROW_HEIGHT)
    
    root = self.tree.AddRoot("Root Item")
    for x in range(0, 7):
      self.tree.AppendItem(root, "Item "+str(x))
    self.tree.Expand(root)
      
    self.Center()
    self.Show()

app = wx.PySimpleApp()
frame = MainWindow(None, -1, "Test Edit Control")
app.MainLoop()

img.png

···

-----Original Message-----
From: Andrea Gavana [mailto:andrea.gavana@gmail.com]
Sent: Tuesday, December 18, 2007 3:49 PM
To: wxPython-users@lists.wxwidgets.org
Subject: Re: [wxPython-users] Re: CustomTreeCtrl Hyperlink

Hi All,

    I have done some modifications to CustomTreeCtrl, including:

- Fixed a bug with hypertext items not getting click event more than
once if selected;
- Substituted wx.TextCtrl with ExpandoTextCtrl to handle in a nicer
way multiline items;
- Now editing multiline items works as expected: use Shift+Enter to
enter a newline character for a multiline item;
- CustomTreeCtrl with wx.TR_FULL_ROW_HIGHLIGHT now selects items when
the user clicks anywhere inside the item row and not only on the item
rect.

If is there someone willing to test the new code, you can find it here:

http://svn.wxwidgets.org/viewvc/wx/wxPython/trunk/wx/lib/customtreectrl.
py?sortby=date&view=log

Otherwise it should be available for the next release. I would be
grateful if someone could do a bit of testing to find out if I did
stupid things in the new version.

Thank you very much.

Andrea.

"Imagination Is The Only Weapon In The War Against Reality."
http://xoomer.alice.it/infinity77/

---------------------------------------------------------------------
To unsubscribe, e-mail: wxPython-users-unsubscribe@lists.wxwidgets.org
For additional commands, e-mail: wxPython-users-help@lists.wxwidgets.org