Opened 6 years ago

Closed 6 years ago

#9711 closed enhancement (fixed)

Functionality to get the item rect from a wxVListBox

Reported by: Javierurien Owned by:
Priority: normal Milestone:
Component: GUI-generic Version:
Keywords: Cc: javierurien@…
Blocked By: Blocking:
Patch: yes

Description

This patch adds the method wxVListBox::GetItemRect(size_t n). This method allows client code to meassure the window rect of an item.

I added this method as per the mail from Vadim (http://lists.wxwidgets.org/pipermail/wx-users/2008-May/107781.html)

It is based on the paint code of the same class.

Restrictions:

  • Item must be visible, otherwise, height results == 0

I couldn't find the /interface directory mentioned HowToSubmitPatches

Attachments (2)

wxWidgets-2.8.8-wxVListBox-GetItemRect.patch download (1.5 KB) - added by Javierurien 6 years ago.
Patch that adds wxVListBox::GetItemRect method
wxWidgets-2.8.8-wxVListBox-GetItemRect.2.patch download (1.5 KB) - added by Javierurien 6 years ago.
Updated patch to return null wxRect in case the item is not visible

Download all attachments as: .zip

Change History (7)

Changed 6 years ago by Javierurien

Patch that adds wxVListBox::GetItemRect method

comment:1 Changed 6 years ago by Javierurien

  • Cc javierurien@… added

comment:2 Changed 6 years ago by neis

  • Patch set

comment:3 Changed 6 years ago by vadz

  • Status changed from new to confirmed

I think it would make sense to return a totally null rectangle (i.e. wxRect()) if the item is not visible, i.e. not even fill its width, wouldn't it?

As for interface directory, it is in svn trunk [only].

comment:4 Changed 6 years ago by Javierurien

Updated to return a null wxRect in case that the item is not visible.

I am patching against wx2.8 branch, should I create a patch for documentation in trunk then?

Changed 6 years ago by Javierurien

Updated patch to return null wxRect in case the item is not visible

comment:5 Changed 6 years ago by vadz

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

Thanks, I've applied a slightly modified version to the trunk as r54601.

Note: See TracTickets for help on using tickets.