wxComboBox

Hi,

the wxComboControl class has a public method

     // return TRUE if the popup is currently shown
     bool IsPopupShown() const { return m_isPopupShown; }

The wxComboBox class is publicly derived from wxComboControl:

class WXDLLEXPORT wxComboBox : public wxComboControl, public wxComboBoxBase

However, the following code generates
         error C2039: 'IsPopupShown' : is not a member of 'wxComboBox'
Why's that?

wxWindow* ww = wxWindow::FindFocus();
wxComboBox* wco = wxDynamicCast(ww, wxComboBox);
if (wco != NULL)
{ bool b = wco->IsPopupShown();
}

Thank you,

Cristina.

···

-------------------------------------------------------
Xnet scaneaza automat toate mesajele impotriva virusilor folosind RAV AntiVirus.
Xnet automatically scans all messages for viruses using RAV AntiVirus.

Nota: RAV AntiVirus poate sa nu detecteze toti virusii noi sau toate variantele lor.
Va rugam sa luati in considerare ca exista un risc de fiecare data cand deschideti
fisiere atasate si ca MobiFon nu este responsabila pentru nici un prejudiciu cauzat
de virusi.

Disclaimer: RAV AntiVirus may not be able to detect all new viruses and variants.
Please be aware that there is a risk involved whenever opening e-mail attachments
to your computer and that MobiFon is not responsible for any damages caused by
viruses.

C. Iacob wrote:

Hi,

the wxComboControl class has a public method

    // return TRUE if the popup is currently shown
    bool IsPopupShown() const { return m_isPopupShown; }

The wxComboBox class is publicly derived from wxComboControl:

class WXDLLEXPORT wxComboBox : public wxComboControl, public wxComboBoxBase

If you take a closer look you'll see that this version of the wxComboBox is only for the wxUniversal port, and that wxComboControl is just an implementation detail of that port. If it was meant to be a public API visible across all ports then IsPopupShown would be in the wxComboBoxBase class.

···

--
Robin Dunn
Software Craftsman
http://wxPython.org Java give you jitters? Relax with wxPython!