Ticket #3224: 3224.patch

File 3224.patch, 1.5 KB (added by oneeyeman, 5 years ago)

Implementation patch

  • wxWidgets/include/wx/msw/listbox.h

    diff -bru wxWidgets/include/wx/msw/listbox.h /mnt/winxp/wxWidgets/include/wx/msw/listbox.h
    old new  
    8585    virtual wxString GetString(unsigned int n) const;
    8686    virtual void SetString(unsigned int n, const wxString& s);
    8787    virtual int FindString(const wxString& s, bool bCase = false) const;
    88 
     88    virtual void EnsureVisible(int n);
    8989    virtual bool IsSelected(int n) const;
    9090    virtual int GetSelection() const;
    9191    virtual int GetSelections(wxArrayInt& aSelections) const;
  • wxWidgets/interface/wx/listbox.h

    diff -bru wxWidgets/interface/wx/listbox.h /mnt/winxp/wxWidgets/interface/wx/listbox.h
    old new  
    287287
    288288        Scroll the listbox if necessary.
    289289
    290         This method is currently only implemented in wxGTK and wxOSX and does
    291         nothing in other ports.
    292 
    293290        @see SetFirstItem()
    294291     */
    295292    virtual void EnsureVisible(int n);
  • wxWidgets/src/msw/listbox.cpp

    diff -bru wxWidgets/src/msw/listbox.cpp /mnt/winxp/wxWidgets/src/msw/listbox.cpp
    old new  
    746746
    747747#endif // wxUSE_OWNER_DRAWN
    748748
     749void wxListBox::EnsureVisible(int n)
     750{
     751    SetFirstItem( n );
     752}
     753
    749754#endif // wxUSE_LISTBOX