Opened 7 years ago

Closed 3 months ago

Last modified 3 months 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

Description

On Linux (wxPython 2.8.6.1/Python 2.5.1) and Mac (wxPython 2.8.4.0/Python 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.8.4.1/Python 2.5) it works as expected.

Cheers, Frank

Attachments (1)

getfirstvisibleitem.py download (433 bytes) - added by fniessink 7 years ago.

Download all attachments as: .zip

Change History (6)

Changed 7 years ago by fniessink

comment:1 Changed 7 years ago by robind

This is not wxPython specific.

comment:2 Changed 6 years ago by wojdyr

  • Keywords wxTreeCtrl added
  • Status changed from new to confirmed

confirmed in 2.8.7.1

comment:3 Changed 3 months 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 3 months ago by VZ

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

In 76940:

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.

comment:5 Changed 3 months 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.