|
Group: Forum Members
Posts: 86,
Visits: 221
|
.. thanks again - now the footer-label for status infos works as expected. Just in case somebody has a similar problem - here the full code: /*----- ChartPane Footer -----*/ //Attn: refresh in ucMain is necessary!!! => _oChartPane._PaneFooter.Refresh(); int iFontSize = 10; m_ContainerPanel = new NDockPanel(); m_ContainerPanel.Location = new NPointL(new NLength(7, NRelativeUnit.ParentPercentage), new NLength(96, NRelativeUnit.ParentPercentage));
m_ContainerPanel.Size = new NSizeL(new NLength(100, NRelativeUnit.ParentPercentage), new NLength(iFontSize + 12, NGraphicsUnit.Pixel)); m_ContainerPanel.DockMode = PanelDockMode.Bottom; m_ContainerPanel.PositionChildPanelsInContentBounds = false; _PaneXLabel.Margins = new NMarginsL(0, 0, 0, 0);
_PaneFooter = new NLabel(""); //_NevronChart.Labels.AddHeader("test footer"); //new NLabel("Test"); _PaneFooter.DockMode = PanelDockMode.None; //alternativly: using Panels.AddFooter _PaneFooter.TextStyle.FontStyle = new NFontStyle("Arial", iFontSize, FontStyle.Regular); _PaneFooter.ContentAlignment = ContentAlignment.MiddleLeft; // BottomCenter; //MiddleLeft; _PaneFooter.FitAlignment = ContentAlignment.MiddleLeft;
_PaneFooter.UseAutomaticSize = false; _PaneFooter.Size = new NSizeL(new NLength(100, NRelativeUnit.ParentPercentage), new NLength(iFontSize + 10, NGraphicsUnit.Pixel)); _PaneFooter.Location = new NPointL(new NLength(100, NRelativeUnit.ParentPercentage), new NLength(85, NRelativeUnit.ParentPercentage)); _PaneFooter.BoundsMode = BoundsMode.None; //fit doesnt work neither _PaneFooter.FitMode = TitleFitMode.Clip; //Clip Mode rather clumsy: Text is clipped at both sides - so probably the status text will loose its meaning...
// apply border to the label NEdgeBorderStyle labelBorder = new NEdgeBorderStyle(); labelBorder.OuterBevelWidth = new NLength(0); labelBorder.InnerBevelWidth = new NLength(0); labelBorder.MiddleBevelWidth = new NLength(1, NGraphicsUnit.Pixel); labelBorder.Shape = BorderShape.Rectangle; labelBorder.MiddleBevelFillStyle = new NColorFillStyle(Color.Black); _PaneFooter.BorderStyle = labelBorder;
_PaneFooter.TextStyle.FontStyle.EmSize = new NLength(9, NGraphicsUnit.Point); _PaneFooter.BackgroundFillStyle = new NColorFillStyle(Color.AliceBlue); //not: _PaneFooter.TextStyle.BackplaneStyle => this is only Background Text Color _PaneFooter.Margins = new NMarginsL(0, 0, 0, 0);
m_ContainerPanel.ChildPanels.Add(_PaneFooter); _NevronChart.Panels.Add(m_ContainerPanel); this.PaneFooter = sPaneFooter; Best regards, Joern
|