Example #1
0
void AttributeWidget::Refresh(const XMLAttribute &attribute)
{
    m_readonly =  attribute.HasProperty(XMLProperty::Readonly);
    m_enabled  = !attribute.HasProperty(XMLProperty::Disabled);
    m_inlined  =  attribute.HasProperty(XMLProperty::Inline);
    m_hidden   =  attribute.HasProperty(XMLProperty::Hidden);

    setEnabled(m_enabled);

    if (m_hidden) // Only hide, to avoid window flickering
    {
        setVisible(false);
        setHidden(true);
        if (m_label)
        {
            m_label->setVisible(false);
            m_label->setHidden(true);
        }
    }
}