Esempio n. 1
0
void SVConditionParam::createCondition()
{
    int nRow = numRows();
    m_pLabel = new WText(m_szLabel, (WContainerWidget*)elementAt(nRow, 0));
    elementAt(nRow, 0)->setContentAlignment(AlignTop | AlignLeft);
    elementAt(nRow, 0)->setStyleClass("cell_10");

    string szValue ("");
    if(!m_szDefaultValue.empty())
        szValue = chLeftBracket + m_szDefaultValue + chRightBracket;

    m_pConditionArea = new WTextArea(szValue, (WContainerWidget*)elementAt(nRow, 1));
    if(m_pConditionArea)
    {
        //if(strcmp(m_szDefaultValue.substr(0, 1).c_str(), &chLeftBracket) == 0 )
        //    m_pConditionArea->setText(m_szDefaultValue);
        m_pConditionArea->setStyleClass(m_szStyle);
    }

    createShowButton(nRow);
    createHelp(nRow);

    m_pOperate = new WTable((WContainerWidget*)elementAt(nRow,1));
    if(m_pOperate)
    {
        m_pOperate->setStyleClass("conditionset");
        createHideButton();
        createAddConidtion();
        createButtonGroup();
        m_pOperate->hide();
    }
}
Esempio n. 2
0
/////////////////////////////////////////////////////////////////////////////////////////////////////////////
// 创建条件
/////////////////////////////////////////////////////////////////////////////////////////////////////////////
void SVConditionParam::createCondition()
{
    int nRow = numRows();
    m_pLabel = new WText(m_szLabel, elementAt(nRow, 0));

    elementAt(nRow, 0)->setContentAlignment(AlignTop | AlignLeft);
    elementAt(nRow, 0)->setStyleClass("table_list_data_input_text");
    GetRow(nRow)->setStyleClass("padding_top");

    string szValue ("");
    if(!m_szDefaultValue.empty())
        szValue = chLeftBracket + m_szDefaultValue + chRightBracket;

    m_pConditionArea = new WTextArea(szValue, elementAt(nRow, 1));

    if(m_pConditionArea)
        m_pConditionArea->setStyleClass(m_szStyle);

    elementAt(nRow, 1)->setStyleClass("table_data_text");

    createShowButton(nRow);
    createHelp(nRow);
    m_pOperate = new WTable(elementAt(nRow,1));
    if(m_pOperate)
    {
        m_pOperate->setStyleClass("conditionset");
        createHideButton();
        createAddConidtion();
        createButtonGroup();
        m_pOperate->hide();
    }
}