protected override NWidget CreateExampleContent() { // create the root tab NStackPanel stack = new NStackPanel(); stack.FillMode = ENStackFillMode.Last; stack.FitMode = ENStackFitMode.Last; // create the HScrollBar m_HScrollBar = new NHScrollBar(); m_HScrollBar.VerticalPlacement = ENVerticalPlacement.Top; m_HScrollBar.StartScrolling += new Function <NEventArgs>(OnScrollBarStartScrolling); m_HScrollBar.ValueChanged += new Function <NValueChangeEventArgs>(OnScrollBarValueChanged); m_HScrollBar.EndScrolling += new Function <NEventArgs>(OnScrollBarEndScrolling); stack.Add(new NGroupBox("Horizontal", m_HScrollBar)); // create the VScrollBar m_VScrollBar = new NVScrollBar(); m_VScrollBar.HorizontalPlacement = ENHorizontalPlacement.Left; m_VScrollBar.StartScrolling += new Function <NEventArgs>(OnScrollBarStartScrolling); m_VScrollBar.ValueChanged += new Function <NValueChangeEventArgs>(OnScrollBarValueChanged); m_VScrollBar.EndScrolling += new Function <NEventArgs>(OnScrollBarEndScrolling); stack.Add(new NGroupBox("Vertical", m_VScrollBar)); return(stack); }
/// <summary> /// /// </summary> /// <returns></returns> protected override NWidget CreateExampleControls() { NStackPanel stack = new NStackPanel(); NStackPanel propertyStack = new NStackPanel(); stack.Add(new NUniSizeBoxGroup(propertyStack)); m_ScrollBar = new NHScrollBar(); m_ScrollBar.Value = 70.0; m_ScrollBar.ValueChanged += new Function <NValueChangeEventArgs>(OnScrollBarValueChanged); propertyStack.Add(new NPairBox("Percent:", m_ScrollBar, true)); return(stack); }
/// <summary> /// /// </summary> /// <returns></returns> protected override NWidget CreateExampleControls() { NStackPanel stack = new NStackPanel(); NStackPanel propertyStack = new NStackPanel(); stack.Add(new NUniSizeBoxGroup(propertyStack)); // begin angle scroll m_BeginAngleScrollBar = new NHScrollBar(); m_BeginAngleScrollBar.Minimum = -360; m_BeginAngleScrollBar.Maximum = 360; m_BeginAngleScrollBar.Value = m_RadialGauge.BeginAngle.ToDegrees(); propertyStack.Add(new NPairBox("Begin Angle:", m_BeginAngleScrollBar)); // sweep angle scroll m_SweepAngleScrollBar = new NHScrollBar(); m_SweepAngleScrollBar.Minimum = -360; m_SweepAngleScrollBar.Maximum = 360; m_SweepAngleScrollBar.Value = m_RadialGauge.SweepAngle.ToDegrees(); propertyStack.Add(new NPairBox("Sweep Angle:", m_SweepAngleScrollBar)); // show max check box m_ShowMinRangeCheckBox = new NCheckBox("Show Min Range"); m_ShowMinRangeCheckBox.Checked = true; propertyStack.Add(m_ShowMinRangeCheckBox); // show min check box m_ShowMaxRangeCheckBox = new NCheckBox("Show Max Range"); m_ShowMaxRangeCheckBox.Checked = true; propertyStack.Add(m_ShowMaxRangeCheckBox); m_BeginAngleScrollBar.ValueChanged += new Function <NValueChangeEventArgs>(OnBeginAngleScrollBarValueChanged); m_SweepAngleScrollBar.ValueChanged += new Function <NValueChangeEventArgs>(OnSweepAngleScrollBarValueChanged); m_ShowMinRangeCheckBox.CheckedChanged += new Function <NValueChangeEventArgs>(OnShowMinRangeCheckBoxCheckedChanged); m_ShowMaxRangeCheckBox.CheckedChanged += new Function <NValueChangeEventArgs>(OnShowMaxRangeCheckBoxCheckedChanged); UpdateAxisRanges(); return(stack); }
protected override NWidget CreateExampleControls() { NStackPanel stack = new NStackPanel(); NStackPanel propertyStack = new NStackPanel(); stack.Add(new NUniSizeBoxGroup(propertyStack)); m_AngleModeComboBox = new NComboBox(); m_AngleModeComboBox.FillFromEnum <ENScaleLabelAngleMode>(); m_AngleModeComboBox.SelectedIndexChanged += new Function <NValueChangeEventArgs>(UpdateScaleLabelAngle); propertyStack.Add(new NPairBox("Angle Mode:", m_AngleModeComboBox, true)); m_CustomAngleNumericUpDown = new NNumericUpDown(); m_CustomAngleNumericUpDown.Minimum = -360; m_CustomAngleNumericUpDown.Maximum = 360; m_CustomAngleNumericUpDown.ValueChanged += new Function <NValueChangeEventArgs>(UpdateScaleLabelAngle); propertyStack.Add(new NPairBox("Custom Angle:", m_CustomAngleNumericUpDown, true)); m_AllowTextFlipCheckBox = new NCheckBox("Allow Text to Flip"); m_AllowTextFlipCheckBox.CheckedChanged += new Function <NValueChangeEventArgs>(UpdateScaleLabelAngle); propertyStack.Add(m_AllowTextFlipCheckBox); m_BeginAngleScrollBar = new NHScrollBar(); m_BeginAngleScrollBar.Minimum = -360; m_BeginAngleScrollBar.Maximum = 360; m_BeginAngleScrollBar.Value = m_RadialGauge.BeginAngle.ToDegrees(); m_BeginAngleScrollBar.ValueChanged += new Function <NValueChangeEventArgs>(OnBeginAngleScrollBarValueChanged); propertyStack.Add(new NPairBox("Begin Angle:", m_BeginAngleScrollBar, true)); m_SweepAngleScrollBar = new NHScrollBar(); m_SweepAngleScrollBar.Minimum = -360.0; m_SweepAngleScrollBar.Maximum = 360.0; m_SweepAngleScrollBar.Value = m_RadialGauge.SweepAngle.ToDegrees(); m_SweepAngleScrollBar.ValueChanged += new Function <NValueChangeEventArgs>(OnSweepAngleScrollBarValueChanged); propertyStack.Add(new NPairBox("Sweep Angle:", m_SweepAngleScrollBar, true)); return(stack); }