The cat is out of the bag...

I understand this is a wxWindows-based list and so what I'm about to speak is
sacrilege, but I think this is a shame. I've been a Delphi believer since the
original 16-bit version 1.0 oh so long ago, and I find the VCL to be a sane,
reasonable, and powerful approach. I always had less trouble manipulating VCL
to do what I wanted than I did, for example, whipping MFC into shape. The
object and event models always seemed quite sensible, and not nearly as opaque
as the alternatives.

However, I have to believe that Borland's involvement with wxWindows can only
benefit both parties.

···

On Tue, 16 Sep 2003 22:23:47 -0700, Robin Dunn <robin@alldunn.com> wrote:

The news is that Borland is using wxWindows as their new GUI framework
of choice for their new C++BuilderX IDE tool due out in a few months.
This is in response to their users' wishes to dump VCL (c++ wrappers
around a Delphi object library) and get a pure C++ solution. ...

--
- Tim Roberts, timr@probo.com
  Providenza & Boekelheide, Inc.

Why doesn't twist buttons show up for a root's child when I
use wxTR_HIDE_ROOT for wxTreeCtrl on Windows? (It works on Linux). Btw,
I'm using icons for all tree items.

self.tree = wxTreeCtrl(self, id, wxDefaultPosition, wxDefaultSize, style =
wxTR_HAS_BUTTONS | wxTR_NO_LINES | wxTR_HIDE_ROOT)
  
Thanks,

Susanne

I'm beginning to clean up and release some code I've had lying around that I thnk might be generally useful. As a modest start, I've made my ListMenu class available at http://starship.python.net/crew/hochberg. To quote that page:

    A subclass of /wx.Menu/ that is initialized using a nested Python
    list. For example, the following create a list with standard menu
    command, a submenu with checkable menu items and another submenu
    with radio menu items:

menu = ListMenu(frame, [("command", _testfunc), None,
                        ("Sub #1", [("checkable #1", _testfunc, 0),
                                    ("checkable #2", _testfunc, 1)]), ("Sub #2", (("radio #1", _testfunc, 'sub2', 0),
                                    ("radio #2", _testfunc, 'sub2', 1)))
                       ])
  
    I find this incredibly helpful and use it for all my Menu creation
    needs. See the source for more details.

    Note that _testfunc is a function I'm binding to each menu event.
    Any function can be used, so no EVT_MENU calls are needed

Check it out. And if you have any suggestions for improvements, including in the documentation, please let me know. Of course I reserve the right to ignore stuff if I feel like it.....

Regards,

-tim

Susanne Lefvert wrote:

Why doesn't twist buttons show up for a root's child when I use wxTR_HIDE_ROOT for wxTreeCtrl on Windows? (It works on Linux). Btw, I'm using icons for all tree items.

self.tree = wxTreeCtrl(self, id, wxDefaultPosition, wxDefaultSize, style = wxTR_HAS_BUTTONS | wxTR_NO_LINES | wxTR_HIDE_ROOT)

I think that's just how the native control works. Even when you don't hide the root the root item doesn't have the buttons, right?

···

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

This is if I don't hide the root:

root
  + child1
    + child's child
  + child2
  + child3
    + child's child
    + child's child

And if I hide root:

  child1
    + child's child
  child2
  child3
    + child's child
    + child's child

Ah, ok, so the children are now root items and can not be expanded. Too
bad! I would like to be able to expand child2 by clicking on a +
button but I understand what you mean.

Thanks

···

On Wed, 17 Sep 2003, Robin Dunn wrote:

Susanne Lefvert wrote:
> Why doesn't twist buttons show up for a root's child when I
> use wxTR_HIDE_ROOT for wxTreeCtrl on Windows? (It works on Linux). Btw,
> I'm using icons for all tree items.
>
> self.tree = wxTreeCtrl(self, id, wxDefaultPosition, wxDefaultSize, style =
> wxTR_HAS_BUTTONS | wxTR_NO_LINES | wxTR_HIDE_ROOT)

I think that's just how the native control works. Even when you don't
hide the root the root item doesn't have the buttons, right?

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

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

Strange, but, if I remeber well, it works fine on my XP box and I can see
all the buttons, even if I hide the root.

Ionutz

···

----- Original Message -----
From: "Susanne Lefvert" <lefvert@mcs.anl.gov>
To: <wxPython-users@lists.wxwindows.org>
Sent: Wednesday, September 17, 2003 23:35
Subject: Re: [wxPython-users] wxTreeCtrl and wxTR_HIDE_ROOT

This is if I don't hide the root:

root
  + child1
    + child's child
  + child2
  + child3
    + child's child
    + child's child

And if I hide root:

  child1
    + child's child
  child2
  child3
    + child's child
    + child's child

Ah, ok, so the children are now root items and can not be expanded. Too
bad! I would like to be able to expand child2 by clicking on a +
button but I understand what you mean.

Thanks