Пример #1
0
NAMESPACE_EDITOR_BEGIN

//-----------------------------------//

wxImageComboBox::wxImageComboBox( wxWindow* parent, wxWindowID id )
    : wxOwnerDrawnComboBox( parent, id, wxEmptyString, wxDefaultPosition,
                            wxSize(-1, -1), 0, nullptr, wxCC_STD_BUTTON/*|wxCB_READONLY*/ )
{
    SetCustomPaintWidth( 150 );
    GetTextCtrl()->Disable();
}
Пример #2
0
void wxBitmapComboBox::DetermineIndent()
{
    //
    // Recalculate amount of empty space needed in front of
    // text in control itself.
    int indent = m_imgAreaWidth = 0;

    if ( m_usedImgSize.x > 0 )
    {
        indent = m_usedImgSize.x + IMAGE_SPACING_LEFT + IMAGE_SPACING_RIGHT;
        m_imgAreaWidth = indent;

        indent -= 3;
    }

    SetCustomPaintWidth(indent);
}