Added wxComboPopup::FindItem() to help in deciding how SetValue() should change the value of a read-only wxComboCtrl. This allows wxOwnerDrawnComboBox to have the same behavior as wxComboBox in that respect.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66409 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -774,6 +774,13 @@ public:
|
||||
// Gets displayed string representation of the value.
|
||||
virtual wxString GetStringValue() const = 0;
|
||||
|
||||
// Called to check if the popup - when an item container - actually
|
||||
// has matching item. Case-sensitivity checking etc. is up to the
|
||||
// implementation. If the found item matched the string, but is
|
||||
// different, it should be written back to pItem. Default implementation
|
||||
// always return true and does not alter trueItem.
|
||||
virtual bool FindItem(const wxString& item, wxString* trueItem=NULL);
|
||||
|
||||
// This is called to custom paint in the combo control itself (ie. not the popup).
|
||||
// Default implementation draws value as string.
|
||||
virtual void PaintComboControl( wxDC& dc, const wxRect& rect );
|
||||
|
@@ -93,6 +93,7 @@ public:
|
||||
virtual void OnComboCharEvent( wxKeyEvent& event );
|
||||
virtual void OnComboDoubleClick();
|
||||
virtual bool LazyCreate();
|
||||
virtual bool FindItem(const wxString& item, wxString* trueItem);
|
||||
|
||||
// Item management
|
||||
void SetSelection( int item );
|
||||
|
Reference in New Issue
Block a user