Add ComboBox::onChange() member function

This commit is contained in:
David Capello 2013-03-29 16:16:24 -03:00
parent 6c3523fbed
commit c5a0acf7c6
2 changed files with 11 additions and 1 deletions

View File

@ -400,7 +400,7 @@ bool ComboBoxListBox::onProcessMessage(Message* msg)
{
int index = m_comboBox->getSelectedItem();
if (isValidItem(index))
m_comboBox->Change();
m_comboBox->onChange();
m_comboBox->closeListBox();
}
@ -510,4 +510,9 @@ JRect ComboBox::getListBoxPos()
return rc;
}
void ComboBox::onChange()
{
Change();
}
} // namespace ui

View File

@ -21,8 +21,12 @@ namespace ui {
class ListBox;
class Window;
class ComboBoxListBox;
class ComboBox : public Widget
{
friend class ComboBoxListBox;
public:
ComboBox();
~ComboBox();
@ -66,6 +70,7 @@ namespace ui {
protected:
bool onProcessMessage(Message* msg) OVERRIDE;
void onPreferredSize(PreferredSizeEvent& ev) OVERRIDE;
virtual void onChange();
private:
void onButtonClick(Event& ev);