Opened 9 years ago

Closed 2 years ago

Last modified 2 years ago

#4482 closed defect (fixed)

Bug in TreeCtrl.GetFirstVisibleItem

Reported by: fniessink Owned by: VZ
Priority: normal Milestone:
Component: GUI-generic Version:
Keywords: wxTreeCtrl Cc: fniessink, robind
Blocked By: Blocking:
Patch: no


On Linux (wxPython 2.5.1) and Mac (wxPython 2.5), attached program says that the hidden(!) root item in the tree control is the first visible item. I would expect the first child of the hidden root item to be the first visible item.

On Windows (wxPython 2.5) it works as expected.

Cheers, Frank

Attachments (1) download (433 bytes) - added by fniessink 9 years ago.

Download all attachments as: .zip

Change History (6)

Changed 9 years ago by fniessink

comment:1 Changed 9 years ago by robind

This is not wxPython specific.

comment:2 Changed 8 years ago by wojdyr

  • Keywords wxTreeCtrl added
  • Status changed from new to confirmed

confirmed in

comment:3 Changed 2 years ago by oneeyeman

This ticket is still reproducible in an unmodified treectrl sample.

  1. Run the sample.
  2. Expand the "Root" item.
  3. Select "Style->Toggle hidden root"
  4. Select "Item->Show first visible".

The log will say: "The first visible item is "Root".

comment:4 Changed 2 years ago by VZ

  • Owner set to VZ
  • Resolution set to fixed
  • Status changed from confirmed to closed

In 76940:

(The changeset message doesn't reference this ticket)

comment:5 Changed 2 years ago by VZ

In 76942:

Don't consider hidden root item to be visible in wxGenericTreeCtrl.

This fixes wrong results returned by GetFirstVisibleItem() in the tree control
with wxTR_HIDE_ROOT style.

Closes #4482.

Note: See TracTickets for help on using tickets.