Example #1
0
void CSVSortList::createContent()
{
    int nRow = numRows();
    WTable * pTable = new WTable(elementAt(nRow,0));	
    if(pTable)
    {
        pTable->setCellPadding(0);
        pTable->setCellSpaceing(0);

        WScrollArea * pScrollArea = new WScrollArea(elementAt(nRow,0));
        if(pScrollArea)
        {
            pScrollArea->setStyleClass("t5"); 
            pScrollArea->setWidget(pTable);
        }
        pTable->setStyleClass("t5"); 
        elementAt(nRow, 0)->setStyleClass("t7");

        nRow = pTable->numRows();
        m_pContent = new WTable(pTable->elementAt(nRow,0));
        pTable->elementAt(nRow,0)->setContentAlignment(AlignTop);
    }

    if(m_pContent)
    {
        m_pContent->setStyleClass("t3");
        nRow = m_pContent->numRows();
        new WText(SVResString::getResString("IDS_Name"), m_pContent->elementAt(nRow, 0));
        new WText(SVResString::getResString("IDS_Sort"), m_pContent->elementAt(nRow, 1));
        m_pContent->GetRow(0)->setStyleClass("t3title");
    }
}
Example #2
0
CMenuTable::CMenuTable(WContainerWidget * parent, const std::string strTitle)
:WTable(parent)
{
	this->setCellPadding(0);
	this->setCellSpaceing(0);
	bShow = true;

	WTable * pTable = new WTable(this->elementAt(0,0));
	pTable->setCellPadding(0);
	pTable->setCellSpaceing(0);
	new WText(strTitle, (WContainerWidget*)pTable->elementAt(0,0));
	pTable->elementAt(0,0)->setStyleClass("navt2title");

	m_pOpenimg = new WImage("../icons/arrowdown.gif", (WContainerWidget *)pTable->elementAt(0, 1)); 
	m_pOpenimg->setStyleClass("helpimg");
	m_pCloseimg = new WImage("../icons/arrowup.gif", (WContainerWidget *)pTable->elementAt(0, 1));
	m_pCloseimg->setStyleClass("helpimg");
	//m_pOpenimg->decorationStyle().setCursor(WCssDecorationStyle::Pointer);
	//m_pCloseimg->decorationStyle().setCursor(WCssDecorationStyle::Pointer);
	//pTable->elementAt(0,0)->resize(15, 11);
	//m_pCloseimg->resize(15, 11);
	pTable->elementAt(0, 1)->setContentAlignment(AlignRight);
	pTable->setStyleClass("navt2");

	m_pOpenimg->hide();
	WObject::connect(pTable->elementAt(0,0),SIGNAL(clicked()),this,SLOT(ShowOrHideTable()));	
	WObject::connect(m_pOpenimg,SIGNAL(clicked()),this,SLOT(ShowTable()));
	WObject::connect(m_pCloseimg,SIGNAL(clicked()),this,SLOT(HideTable()));	
	

	m_pContentTable = new WTable((WContainerWidget*)this->elementAt(1,0)) ;	
	m_pContentTable->setCellPadding(0);
	m_pContentTable->setCellSpaceing(0);
	m_pContentTable->setStyleClass("navt3");
}