예제 #1
0
void ComboBox::showPopup(void)
{
    Pnt2f BorderTopLeft, BorderBottomRight;
    getInsideInsetsBounds(BorderTopLeft, BorderBottomRight);

    getComboListPopupMenu()->setInvoker(this);
    getComboListPopupMenu()->setVisible(true);
    getComboListPopupMenu()->setPosition(ComponentToFrame(BorderTopLeft + Vec2f(0,BorderBottomRight.y()), this));
    getComboListPopupMenu()->setSelection(getModel()->getSelectedItemIndex());

    getParentWindow()->pushToActivePopupMenus(getComboListPopupMenu());
}
예제 #2
0
void Component::setToolTipLocation(const Pnt2f& Location)
{
    if(getToolTip() != NULL)
    {
        if(getParentWindow() != NULL &&
           getParentWindow()->getParentDrawingSurface() != NULL)
        {
            getToolTip()->setPosition(ComponentToFrame(Location,this));
        }
        else
        {
            getToolTip()->setPosition(Location);
        }
    }
}