Exemplo n.º 1
0
void CReportCtrl::Initialize(const CReportCtrl::ColInfo cols[], int nColCount, UINT nOpFlag)
{
	m_nOpFlag = nOpFlag;
	m_cols = cols;
	m_nColCount = nColCount;

	AllowEdit(nOpFlag != 0);
	SetGridStyle(FALSE,xtpReportGridSolid);
	GetPaintManager()->SetColumnStyle(xtpReportColumnResource);
	GetPaintManager()->m_strNoItems.Empty();

	for (int i=0; i<nColCount; ++i)
	{
		const ColInfo &c = cols[i];
		if (c.fmt != FmtIdOnly)
		{
			CXTPReportColumn *pCol = new CXTPReportColumn(GetColumns()->GetCount(),c.caption,c.width,
			!c.fixed,XTP_REPORT_NOICON,c.sortable);
			pCol->AllowRemove(FALSE);
			pCol->SetAllowDrag(FALSE);
			AddColumn(pCol);
		}
	}

	if (nOpFlag & OpModify)
		m_pSubmitOpCol = AddOpCol(IndexModify);
	if (nOpFlag & OpReset)
		m_pResetOpCol = AddOpCol(IndexReset);
	if (nOpFlag & OpDelete)
		m_pDeleteOpCol = AddOpCol(IndexDelete);
 

}
Exemplo n.º 2
0
UmlCanvas::UmlCanvas(wxSFDiagramManager* manager, UmlEditor* editor)
	: wxSFShapeCanvas(manager, editor, wxID_ANY, wxDefaultPosition,
	 editor->GetSize(), wxHSCROLL | wxVSCROLL | wxSTATIC_BORDER)
// LETARTARE
	 ,EditDiag (0), m_Editor(editor)
{
	editor->SetCanvas(this);
	//AddStyle(sfsGRID_USE);
	//AddStyle(sfsGRID_SHOW);
	SetGridLineMult(5);
	SetGridStyle(wxSHORT_DASH);
	AddStyle(sfsGRADIENT_BACKGROUND);
	SetGradientFrom(sfdvSHAPECANVAS_GRADIENT_FROM);
	SetGradientTo(sfdvSHAPECANVAS_GRADIENT_TO);
	GetDiagramManager()->ClearAcceptedShapes();
	GetDiagramManager()->AcceptShape(_T("All"));
}