setHeight() public method

public setHeight ( float rhs ) : void
rhs float
return void
Esempio n. 1
0
		// TODO: this function shouldn't be needed
		//
        private void pCopyAspectToPaint(cReportAspect fromAspect, cReportAspect toAspect) { 
            toAspect.setAlign(fromAspect.getAlign());
            toAspect.setBackColor(fromAspect.getBackColor());
            toAspect.setBorderColor(fromAspect.getBorderColor());
            toAspect.setBorderColor3d(fromAspect.getBorderColor3d());
            toAspect.setBorderColor3dShadow(fromAspect.getBorderColor3dShadow());
            toAspect.setBorderType(fromAspect.getBorderType());
            toAspect.setBorderWidth(fromAspect.getBorderWidth());
            toAspect.setCanGrow(fromAspect.getCanGrow());
            toAspect.setFormat(fromAspect.getFormat());
            toAspect.setHeight(fromAspect.getHeight());
            toAspect.setIsAccounting(fromAspect.getIsAccounting());
            toAspect.setLeft(fromAspect.getLeft());
            toAspect.setNZOrder(fromAspect.getNZOrder());
            toAspect.setSelectColor(fromAspect.getSelectColor());
            toAspect.setSymbol(fromAspect.getSymbol());
            toAspect.setTop(fromAspect.getTop());
            toAspect.setTransparent(fromAspect.getTransparent());
            toAspect.setWidth(fromAspect.getWidth());
            toAspect.setWordWrap(fromAspect.getWordWrap());

            pCopyFontPaint(fromAspect.getFont(), toAspect.getFont());
        }
Esempio n. 2
0
        private void pMoveControl(cReportAspect aspect, bool bSizing) { 
            const int C_MIN_WIDTH = 10;
            const int C_MIN_HEIGHT = 10;

            cReportAspect rptCtrlAspect = null;

            if (m_paint.getPaintObject(m_keySizing).getRptType() == csRptTypeSection.CONTROL) {
                rptCtrlAspect = m_report.getControls().item(m_paint.getPaintObject(m_keySizing).getTag()).getLabel().getAspect();
                rptCtrlAspect.setLeft(aspect.getLeft());
                if (!bSizing) {
                    rptCtrlAspect.setTop(aspect.getTop() + aspect.getOffset());
                } 
                else {
                    rptCtrlAspect.setTop(aspect.getTop());
                }
                rptCtrlAspect.setWidth(aspect.getWidth());
                rptCtrlAspect.setHeight(aspect.getHeight());
            }

            switch (m_moveType) {
                case  csRptEditorMoveType.CSRPTEDMOVDOWN:
                    m_paint.alingObjBottomToGrid(m_keySizing);
                    break;
                case  csRptEditorMoveType.CSRPTEDMOVLEFT:
                    m_paint.alingObjLeftToGrid(m_keySizing);
                    break;
                case  csRptEditorMoveType.CSRPTEDMOVRIGHT:
                    m_paint.alingObjRightToGrid(m_keySizing);
                    break;
                case  csRptEditorMoveType.CSRPTEDMOVUP:
                    m_paint.alingObjTopToGrid(m_keySizing);
                    break;
                case  csRptEditorMoveType.CSRPTEDMOVLEFTDOWN:
                    m_paint.alingObjLeftBottomToGrid(m_keySizing);
                    break;
                case  csRptEditorMoveType.CSRPTEDMOVLEFTUP:
                    m_paint.alingObjLeftTopToGrid(m_keySizing);
                    break;
                case  csRptEditorMoveType.CSRPTEDMOVRIGHTDOWN:
                    m_paint.alingObjRightBottomToGrid(m_keySizing);
                    break;
                case  csRptEditorMoveType.CSRPTEDMOVRIGHTUP:
                    m_paint.alingObjRightTopToGrid(m_keySizing);
                    break;
            }

            // Validations

            // Width can't be lower than C_MIN_WIDTH
            //
            if (aspect.getWidth() < C_MIN_WIDTH) { aspect.setWidth(C_MIN_WIDTH); }
            
            // Height can't be lower than C_MIN_HEIGHT
            //
            if (aspect.getHeight() < C_MIN_HEIGHT) { aspect.setHeight(C_MIN_HEIGHT); }
        }
        public bool drawRule(String key, Graphics graph)
        {
            const int LINE_COLOR = 0xcc6600;
            int top = 0;
            float heightSec = 0;
            cReportAspect aspect = null;

            aspect = new cReportAspect();

            cReportPaintObject w_item = m_paintSections.item(key);
            heightSec = w_item.getHeightSecLine() * 0.5f;
            cReportAspect w_aspect = w_item.getAspect();
            aspect.setTop(w_aspect.getTop() + 3 - heightSec);
            aspect.setOffset(w_aspect.getOffset());
            aspect.setTransparent(true);
            aspect.setLeft(0);
            aspect.setHeight(20);
            aspect.setAlign(HorizontalAlignment.Right);
            aspect.setWidth(graph.ClipBounds.Width - 1);

            if (w_item.getTextLine() != "")
            {
                top = - Convert.ToInt32(w_item.getHeightSec());
                w_aspect = w_item.getAspect();
                top += Convert.ToInt32(w_aspect.getTop() - w_aspect.getOffset() - 6 + w_aspect.getHeight() * 2);

                printLine(graph, 
                            true, 
                            0, 
                            top, 
                            aspect.getWidth(), 
                            top,
                            LINE_COLOR, 
                            1, 
                            true,
                            LINE_COLOR, 
                            false);

                // last section line
                //
                printText(graph, w_item.getTextLine(), aspect, w_item.getImage());

                heightSec = w_item.getHeightSec() * 0.5f;

                // print section's name
                //
                w_aspect = m_paintSections.item(key).getAspect();
                aspect.setTop(w_aspect.getTop() - heightSec);
                aspect.setAlign(HorizontalAlignment.Left);

                printText(graph, w_item.getText(), aspect, w_item.getImage());

            }
            else
            {
                top = Convert.ToInt32(aspect.getTop() - aspect.getOffset() - heightSec + w_item.getAspect().getHeight());

                if (w_item.getIsSection())
                {
                    printLine(graph, 
                                true,
                                0, 
                                top, 
                                aspect.getWidth(), 
                                top,
                                LINE_COLOR, 
                                1, 
                                true,
                                LINE_COLOR, 
                                false);
                }

                // every section line except the last one
                //
                printText(graph, w_item.getText(), aspect, w_item.getImage());
            }
            
            if (w_item == m_paintSections.item(m_paintSections.count() - 1)) 
            {
                top = Convert.ToInt32(aspect.getTop() + w_item.getHeightSecLine() - heightSec - aspect.getOffset() + 6);

                if (w_item.getIsSection())
                {
                    printLine(graph,
                                true,
                                0,
                                top,
                                aspect.getWidth(),
                                top,
                                LINE_COLOR,
                                1,
                                true,
                                LINE_COLOR,
                                false);
                }
            }

            return true;
        }