diff --git a/instat/dlgGeneralForGraphics.Designer.vb b/instat/dlgGeneralForGraphics.Designer.vb index cf1d7c3eb33..fbfce4b4093 100644 --- a/instat/dlgGeneralForGraphics.Designer.vb +++ b/instat/dlgGeneralForGraphics.Designer.vb @@ -50,6 +50,7 @@ Partial Class dlgGeneralForGraphics Me.ucrGraphicsSelector = New instat.ucrSelectorByDataFrameAddRemove() Me.ucrAdditionalLayers = New instat.ucrAdditionalLayers() Me.ucrBase = New instat.ucrButtons() + Me.ucrChkUseasNumeric = New instat.ucrCheck() Me.SuspendLayout() ' 'cmdOptions @@ -78,7 +79,7 @@ Partial Class dlgGeneralForGraphics ' Me.lblFillOrColor.AutoSize = True Me.lblFillOrColor.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.lblFillOrColor.Location = New System.Drawing.Point(264, 231) + Me.lblFillOrColor.Location = New System.Drawing.Point(264, 280) Me.lblFillOrColor.Name = "lblFillOrColor" Me.lblFillOrColor.Size = New System.Drawing.Size(57, 13) Me.lblFillOrColor.TabIndex = 4 @@ -133,7 +134,7 @@ Partial Class dlgGeneralForGraphics ' Me.ucrFillOrColourReceiver.AutoSize = True Me.ucrFillOrColourReceiver.frmParent = Me - Me.ucrFillOrColourReceiver.Location = New System.Drawing.Point(262, 246) + Me.ucrFillOrColourReceiver.Location = New System.Drawing.Point(262, 295) Me.ucrFillOrColourReceiver.Margin = New System.Windows.Forms.Padding(0) Me.ucrFillOrColourReceiver.Name = "ucrFillOrColourReceiver" Me.ucrFillOrColourReceiver.Selector = Nothing @@ -184,12 +185,22 @@ Partial Class dlgGeneralForGraphics Me.ucrBase.Size = New System.Drawing.Size(408, 52) Me.ucrBase.TabIndex = 9 ' + 'ucrChkUseasNumeric + ' + Me.ucrChkUseasNumeric.AutoSize = True + Me.ucrChkUseasNumeric.Checked = False + Me.ucrChkUseasNumeric.Location = New System.Drawing.Point(262, 241) + Me.ucrChkUseasNumeric.Name = "ucrChkUseasNumeric" + Me.ucrChkUseasNumeric.Size = New System.Drawing.Size(125, 23) + Me.ucrChkUseasNumeric.TabIndex = 20 + ' 'dlgGeneralForGraphics ' Me.AutoScaleDimensions = New System.Drawing.SizeF(96.0!, 96.0!) Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi Me.AutoSize = True Me.ClientSize = New System.Drawing.Size(416, 519) + Me.Controls.Add(Me.ucrChkUseasNumeric) Me.Controls.Add(Me.cmdTheme) Me.Controls.Add(Me.cmdFacets) Me.Controls.Add(Me.ucrSave) @@ -226,4 +237,5 @@ Partial Class dlgGeneralForGraphics Friend WithEvents ucrSave As ucrSave Friend WithEvents cmdTheme As Button Friend WithEvents cmdFacets As Button + Friend WithEvents ucrChkUseasNumeric As ucrCheck End Class diff --git a/instat/dlgGeneralForGraphics.vb b/instat/dlgGeneralForGraphics.vb index 4a6c454a5f2..3cd569aceb2 100644 --- a/instat/dlgGeneralForGraphics.vb +++ b/instat/dlgGeneralForGraphics.vb @@ -24,7 +24,7 @@ Public Class dlgGeneralForGraphics 'list of completed layers. Private iLayerIndex As Integer 'current layer - Private clsGlobalAesFunction As New RFunction + Private clsGlobalAesFunction, clsScaleContinuousFunction, clsLevelsFunction As New RFunction Private clsBaseOperator As ROperator Private strGlobalDataFrame As String Public bDataFrameSet As Boolean @@ -47,6 +47,7 @@ Public Class dlgGeneralForGraphics Private clsScaleFillViridisFunction As New RFunction Private clsScaleColourViridisFunction As New RFunction Private clsAnnotateFunction As New RFunction + Private clsDummyFunction As New RFunction Private Sub dlgGeneralForGraphics_Load(sender As Object, e As EventArgs) Handles MyBase.Load If bFirstLoad Then @@ -88,6 +89,10 @@ Public Class dlgGeneralForGraphics ucrReceiverX.SetValuesToIgnore({Chr(34) & Chr(34)}) ucrReceiverX.bAddParameterIfEmpty = True + ucrChkUseasNumeric.SetText("Group X") + ucrChkUseasNumeric.AddParameterValuesCondition(True, "group", "True") + ucrChkUseasNumeric.AddParameterValuesCondition(False, "group", "False") + ucrFillOrColourReceiver.Selector = ucrGraphicsSelector ucrFillOrColourReceiver.SetIncludedDataTypes({"factor"}) ucrFillOrColourReceiver.strSelectorHeading = "Factors" @@ -100,12 +105,16 @@ Public Class dlgGeneralForGraphics ucrSave.SetCheckBoxText("Save Graph") ucrSave.SetDataFrameSelector(ucrGraphicsSelector.ucrAvailableDataFrames) ucrSave.SetAssignToIfUncheckedValue("last_graph") + VariableXType() End Sub Private Sub SetDefaults() clsGgplotFunction = New RFunction clsGlobalAesFunction = New RFunction + clsScaleContinuousFunction = New RFunction + clsLevelsFunction = New RFunction clsBaseOperator = New ROperator + clsDummyFunction = New RFunction ucrSave.Reset() @@ -115,6 +124,8 @@ Public Class dlgGeneralForGraphics bDataFrameSet = False bResetOptionsSubdialog = True + clsDummyFunction.AddParameter("group", "false", iPosition:=0) + clsBaseOperator.SetOperation("+") clsBaseOperator.AddParameter("ggplot", clsRFunctionParameter:=clsGgplotFunction, iPosition:=0) clsBaseOperator.AddParameter(GgplotDefaults.clsDefaultThemeParameter.Clone()) @@ -126,6 +137,15 @@ Public Class dlgGeneralForGraphics clsGlobalAesFunction.SetPackageName("ggplot2") clsGlobalAesFunction.SetRCommand("aes") + clsLevelsFunction.SetPackageName("base") + clsLevelsFunction.SetRCommand("levels") + clsLevelsFunction.AddParameter("y", ucrReceiverX.GetVariableNames(False), bIncludeArgumentName:=False, iPosition:=0) + + clsScaleContinuousFunction.SetPackageName("ggplot2") + clsScaleContinuousFunction.SetRCommand("scale_x_continuous") + clsScaleContinuousFunction.AddParameter("breaks", "1:12", iPosition:=1) + clsScaleContinuousFunction.AddParameter("labels", clsRFunctionParameter:=clsLevelsFunction, iPosition:=2) + clsXlabsFunction = GgplotDefaults.clsXlabTitleFunction.Clone() clsYlabsFunction = GgplotDefaults.clsYlabTitleFunction.Clone() clsLabsFunction = GgplotDefaults.clsDefaultLabs.Clone() @@ -154,8 +174,12 @@ Public Class dlgGeneralForGraphics End Sub Private Sub SetRCodeForControls(bReset As Boolean) + ucrReceiverX.AddAdditionalCodeParameterPair(clsLevelsFunction, New RParameter("y", ucrReceiverX.GetVariableNames(False), bNewIncludeArgumentName:=False), iAdditionalPairNo:=1) ucrGraphicsSelector.SetRCode(clsGgplotFunction, bReset) ucrVariablesAsFactorForGraphics.SetRCode(clsGlobalAesFunction, bReset) + If bReset Then + ucrChkUseasNumeric.SetRCode(clsDummyFunction, bReset) + End If ucrReceiverX.SetRCode(clsGlobalAesFunction, bReset) ucrFillOrColourReceiver.SetRCode(clsGlobalAesFunction, bReset) ucrSave.SetRCode(clsBaseOperator, bReset) @@ -190,6 +214,7 @@ Public Class dlgGeneralForGraphics Private Sub ucrAdditionalLayers_NumberOfLayersChanged() Handles ucrAdditionalLayers.NumberOfLayersChanged 'When the number of Layers in the lstLayers on ucrAdditionalLayers need to check if OK is enabled on dlgGeneralForGraphics. 'TestOKEnabled() + VariableXType() End Sub Private Sub cmdFacets_Click(sender As Object, e As EventArgs) Handles cmdFacets.Click @@ -219,12 +244,7 @@ Public Class dlgGeneralForGraphics sdgPlots.EnableLayersTab() End Sub - Private Sub ucrVariablesAsFactorForGraphics_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrVariablesAsFactorForGraphics.ControlValueChanged, ucrReceiverX.ControlValueChanged, ucrFillOrColourReceiver.ControlValueChanged - If Not ucrReceiverX.IsEmpty Then - clsGlobalAesFunction.AddParameter("x", ucrReceiverX.GetVariableNames(False), iPosition:=0) - Else - clsGlobalAesFunction.RemoveParameterByName("x") - End If + Private Sub ucrVariablesAsFactorForGraphics_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrVariablesAsFactorForGraphics.ControlValueChanged, ucrFillOrColourReceiver.ControlValueChanged If Not ucrVariablesAsFactorForGraphics.IsEmpty Then clsGlobalAesFunction.AddParameter("y", ucrVariablesAsFactorForGraphics.GetVariableNames(False), iPosition:=1) Else @@ -237,7 +257,26 @@ Public Class dlgGeneralForGraphics End If End Sub - Private Sub AllControl_ControlContentsChanged() Handles ucrReceiverX.ControlContentsChanged, ucrVariablesAsFactorForGraphics.ControlContentsChanged, ucrSave.ControlContentsChanged + Private Sub AllControl_ControlContentsChanged() Handles ucrReceiverX.ControlContentsChanged, ucrVariablesAsFactorForGraphics.ControlContentsChanged, ucrSave.ControlContentsChanged, ucrChkUseasNumeric.ControlContentsChanged TestOKEnabled() End Sub + + Private Sub VariableXType() + ucrChkUseasNumeric.Visible = False + If Not ucrReceiverX.IsEmpty Then + clsGlobalAesFunction.AddParameter("x", ucrReceiverX.GetVariableNames(False), iPosition:=0) + ucrChkUseasNumeric.Visible = ucrReceiverX.strCurrDataType = "factor" + If ucrChkUseasNumeric.Checked Then + clsGlobalAesFunction.AddParameter("group", "1", iPosition:=2) + Else + clsGlobalAesFunction.RemoveParameterByName("group") + End If + Else + clsGlobalAesFunction.RemoveParameterByName("x") + End If + End Sub + + Private Sub ucrReceiverX_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrReceiverX.ControlValueChanged, ucrChkUseasNumeric.ControlValueChanged + VariableXType() + End Sub End Class \ No newline at end of file diff --git a/instat/dlgHistogram.designer.vb b/instat/dlgHistogram.designer.vb index 2b13fdbd1c5..46b7178c5f8 100644 --- a/instat/dlgHistogram.designer.vb +++ b/instat/dlgHistogram.designer.vb @@ -62,6 +62,8 @@ Partial Class dlgHistogram Me.ucrHistogramSelector = New instat.ucrSelectorByDataFrameAddRemove() Me.ucrBase = New instat.ucrButtons() Me.ucrPnlOptions = New instat.UcrPanel() + Me.lblReorder = New System.Windows.Forms.Label() + Me.ucrInputAddReorder = New instat.ucrInputComboBox() Me.contextMenuStripOptions.SuspendLayout() Me.SuspendLayout() ' @@ -234,7 +236,7 @@ Partial Class dlgHistogram 'ucrSaveHist ' Me.ucrSaveHist.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink - Me.ucrSaveHist.Location = New System.Drawing.Point(10, 311) + Me.ucrSaveHist.Location = New System.Drawing.Point(10, 342) Me.ucrSaveHist.Margin = New System.Windows.Forms.Padding(5) Me.ucrSaveHist.Name = "ucrSaveHist" Me.ucrSaveHist.Size = New System.Drawing.Size(322, 24) @@ -283,7 +285,7 @@ Partial Class dlgHistogram ' Me.ucrBase.AutoSize = True Me.ucrBase.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink - Me.ucrBase.Location = New System.Drawing.Point(10, 334) + Me.ucrBase.Location = New System.Drawing.Point(10, 365) Me.ucrBase.Margin = New System.Windows.Forms.Padding(4) Me.ucrBase.Name = "ucrBase" Me.ucrBase.Size = New System.Drawing.Size(408, 52) @@ -298,12 +300,35 @@ Partial Class dlgHistogram Me.ucrPnlOptions.Size = New System.Drawing.Size(433, 30) Me.ucrPnlOptions.TabIndex = 0 ' + 'lblReorder + ' + Me.lblReorder.AutoSize = True + Me.lblReorder.ImeMode = System.Windows.Forms.ImeMode.NoControl + Me.lblReorder.Location = New System.Drawing.Point(286, 298) + Me.lblReorder.Name = "lblReorder" + Me.lblReorder.Size = New System.Drawing.Size(48, 13) + Me.lblReorder.TabIndex = 38 + Me.lblReorder.Text = "Reorder:" + ' + 'ucrInputAddReorder + ' + Me.ucrInputAddReorder.AddQuotesIfUnrecognised = True + Me.ucrInputAddReorder.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink + Me.ucrInputAddReorder.GetSetSelectedIndex = -1 + Me.ucrInputAddReorder.IsReadOnly = False + Me.ucrInputAddReorder.Location = New System.Drawing.Point(287, 314) + Me.ucrInputAddReorder.Name = "ucrInputAddReorder" + Me.ucrInputAddReorder.Size = New System.Drawing.Size(120, 21) + Me.ucrInputAddReorder.TabIndex = 39 + ' 'dlgHistogram ' Me.AutoScaleDimensions = New System.Drawing.SizeF(96.0!, 96.0!) Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi Me.AutoSize = True - Me.ClientSize = New System.Drawing.Size(448, 394) + Me.ClientSize = New System.Drawing.Size(448, 422) + Me.Controls.Add(Me.lblReorder) + Me.Controls.Add(Me.ucrInputAddReorder) Me.Controls.Add(Me.cmdOptions) Me.Controls.Add(Me.ucrChkDisplayAsDotPlot) Me.Controls.Add(Me.ucrChkRidges) @@ -355,4 +380,6 @@ Partial Class dlgHistogram Friend WithEvents toolStripMenuItemDensityRidgesOptions As ToolStripMenuItem Friend WithEvents toolStripMenuItemFrequencyPolygonOptions As ToolStripMenuItem Friend WithEvents toolStripMenuItemDotOptions As ToolStripMenuItem + Friend WithEvents lblReorder As Label + Friend WithEvents ucrInputAddReorder As ucrInputComboBox End Class \ No newline at end of file diff --git a/instat/dlgHistogram.vb b/instat/dlgHistogram.vb index 4d8fce75cc8..26c424d6094 100644 --- a/instat/dlgHistogram.vb +++ b/instat/dlgHistogram.vb @@ -43,6 +43,14 @@ Public Class dlgHistogram Private clsScaleFillViridisFunction As New RFunction Private clsScaleColourViridisFunction As New RFunction Private clsAnnotateFunction As New RFunction + Private clsForecatsReverse As New RFunction + Private clsForecatsInfreqValue As New RFunction + Private clsForecatsReverseValue As New RFunction + + Private ReadOnly strAscending As String = "Ascending" + Private ReadOnly strDescending As String = "Descending" + Private ReadOnly strReverse As String = "Reverse" + Private ReadOnly strNone As String = "None" 'Parameter names for geoms Private strFirstParameterName As String = "geomfunc" @@ -119,6 +127,10 @@ Public Class dlgHistogram ucrVariablesAsFactorforHist.bWithQuotes = False ucrVariablesAsFactorforHist.SetParameterIsString() + ucrInputAddReorder.SetItems({strAscending, strDescending, strReverse, strNone}) + ucrInputAddReorder.SetDropDownStyleAsNonEditable() + ucrInputAddReorder.SetLinkedDisplayControl(lblReorder) + ucrPnlOptions.AddToLinkedControls({ucrChkDisplayAsDotPlot}, {rdoHistogram}, bNewLinkedHideIfParameterMissing:=True) ucrPnlOptions.AddToLinkedControls({ucrChkRidges}, {rdoDensity_ridges}, bNewLinkedHideIfParameterMissing:=True) ucrChkRidges.AddToLinkedControls(ucrInputStats, {"FALSE"}, bNewLinkedHideIfParameterMissing:=True) @@ -139,6 +151,9 @@ Public Class dlgHistogram clsRaesFunction = New RFunction clsHistAesFunction = New RFunction clsPercentage = New RFunction + clsForecatsReverse = New RFunction + clsForecatsInfreqValue = New RFunction + clsForecatsReverseValue = New RFunction ucrHistogramSelector.Reset() ucrHistogramSelector.SetGgplotFunction(clsBaseOperator) ucrSaveHist.Reset() @@ -146,6 +161,9 @@ Public Class dlgHistogram bResetSubdialog = True bResetHistLayerSubdialog = True + ucrInputAddReorder.SetText(strNone) + ucrInputAddReorder.bUpdateRCodeFromControl = True + clsBaseOperator.SetOperation("+") clsBaseOperator.AddParameter("ggplot", clsRFunctionParameter:=clsRggplotFunction, iPosition:=0) clsBaseOperator.AddParameter(strFirstParameterName, clsRFunctionParameter:=clsRgeomPlotFunction, iPosition:=2) @@ -168,6 +186,15 @@ Public Class dlgHistogram clsPercentage.SetPackageName("scales") clsPercentage.SetRCommand("percent_format") + clsForecatsReverse.SetPackageName("forcats") + clsForecatsReverse.SetRCommand("fct_rev") + + clsForecatsReverseValue.SetPackageName("forcats") + clsForecatsReverseValue.SetRCommand("fct_rev") + + clsForecatsInfreqValue.SetPackageName("forcats") + clsForecatsInfreqValue.SetRCommand("fct_infreq") + clsBaseOperator.AddParameter(GgplotDefaults.clsDefaultThemeParameter.Clone()) clsXlabsFunction = GgplotDefaults.clsXlabTitleFunction.Clone() clsYlabFunction = GgplotDefaults.clsYlabTitleFunction.Clone() @@ -198,10 +225,10 @@ Public Class dlgHistogram ucrChkPercentages.SetRCode(clsYScalecontinuousFunction, bReset) ucrChkDisplayAsDotPlot.SetRCode(clsRgeomPlotFunction, bReset) ucrChkRidges.SetRCode(clsRgeomPlotFunction, bReset) - ucrFactorReceiver.SetRCode(clsRaesFunction, bReset) ucrVariablesAsFactorforHist.SetRCode(clsRaesFunction, bReset) If bReset Then ucrInputStats.SetRCode(clsHistAesFunction, bReset) + ucrFactorReceiver.SetRCode(clsRaesFunction, bReset) End If End Sub @@ -225,6 +252,8 @@ Public Class dlgHistogram clsHistAesFunction.RemoveParameterByName("y") clsHistAesFunction.AddParameter("y", "stat(count)", iPosition:=0) clsRgeomPlotFunction.SetPackageName("ggplot2") + ucrInputAddReorder.Visible = Not ucrFactorReceiver.IsEmpty() + If rdoHistogram.Checked Then If ucrChkDisplayAsDotPlot.Checked Then clsRgeomPlotFunction.SetRCommand("geom_dotplot") @@ -242,12 +271,14 @@ Public Class dlgHistogram clsHistAesFunction.AddParameter("y", clsRFunctionParameter:=ucrFactorReceiver.GetVariables(), iPosition:=2) clsRgeomPlotFunction.SetPackageName("ggridges") clsRgeomPlotFunction.SetRCommand("geom_density_ridges") + clsRgeomPlotFunction.RemoveParameterByName("mapping") If Not ucrSaveHist.bUserTyped Then ucrSaveHist.SetPrefix("density_ridges") End If Else ucrFactorReceiver.ChangeParameterName("colour") clsRgeomPlotFunction.SetRCommand("geom_density") + clsRgeomPlotFunction.AddParameter("mapping", clsRFunctionParameter:=clsHistAesFunction) If Not ucrSaveHist.bUserTyped Then ucrSaveHist.SetPrefix("density") End If @@ -260,9 +291,66 @@ Public Class dlgHistogram End If End If autoTranslate(Me) + UpdateParameter() End Sub - Private Sub ucrPnlOptions_Control() Handles ucrPnlOptions.ControlValueChanged, ucrChkDisplayAsDotPlot.ControlValueChanged, ucrChkRidges.ControlValueChanged, ucrFactorReceiver.ControlValueChanged, ucrVariablesAsFactorforHist.ControlValueChanged + Private Sub UpdateParameter() + Dim strChangedTextFreq As String = ucrInputAddReorder.GetText() + clsRaesFunction.RemoveParameterByName("colour") + clsRaesFunction.RemoveParameterByName("y") + clsRaesFunction.RemoveParameterByName("fill") + + clsForecatsInfreqValue.AddParameter("f", "as.factor(" & ucrFactorReceiver.GetVariableNames(False) & ")", iPosition:=0) + + If rdoHistogram.Checked Then + If Not ucrFactorReceiver.IsEmpty Then + Select Case strChangedTextFreq + Case strAscending + clsForecatsReverse.AddParameter("f", clsRFunctionParameter:=clsForecatsInfreqValue, iPosition:=0) + clsRaesFunction.AddParameter("fill", clsRFunctionParameter:=clsForecatsReverse, iPosition:=0) + Case strDescending + clsRaesFunction.AddParameter("fill", clsRFunctionParameter:=clsForecatsInfreqValue, iPosition:=0) + Case strReverse + clsForecatsReverse.AddParameter("f", ucrFactorReceiver.GetVariableNames(False), iPosition:=0) + clsRaesFunction.AddParameter("fill", clsRFunctionParameter:=clsForecatsReverse, iPosition:=0) + Case strNone + clsRaesFunction.AddParameter("fill", ucrFactorReceiver.GetVariableNames(False), iPosition:=0) + End Select + End If + Else + If Not ucrFactorReceiver.IsEmpty Then + If rdoDensity_ridges.Checked AndAlso ucrChkRidges.Checked Then + Select Case strChangedTextFreq + Case strAscending + clsForecatsReverse.AddParameter("f", clsRFunctionParameter:=clsForecatsInfreqValue, iPosition:=0) + clsRaesFunction.AddParameter("y", clsRFunctionParameter:=clsForecatsReverse, iPosition:=0) + Case strDescending + clsRaesFunction.AddParameter("y", clsRFunctionParameter:=clsForecatsInfreqValue, iPosition:=0) + Case strReverse + clsForecatsReverse.AddParameter("f", ucrFactorReceiver.GetVariableNames(False), iPosition:=0) + clsRaesFunction.AddParameter("y", clsRFunctionParameter:=clsForecatsReverse, iPosition:=0) + Case strNone + clsRaesFunction.AddParameter("y", ucrFactorReceiver.GetVariableNames(False), iPosition:=0) + End Select + Else + Select Case strChangedTextFreq + Case strAscending + clsForecatsReverse.AddParameter("f", clsRFunctionParameter:=clsForecatsInfreqValue, iPosition:=0) + clsRaesFunction.AddParameter("colour", clsRFunctionParameter:=clsForecatsReverse, iPosition:=0) + Case strDescending + clsRaesFunction.AddParameter("colour", clsRFunctionParameter:=clsForecatsInfreqValue, iPosition:=0) + Case strReverse + clsForecatsReverse.AddParameter("f", ucrFactorReceiver.GetVariableNames(False), iPosition:=0) + clsRaesFunction.AddParameter("colour", clsRFunctionParameter:=clsForecatsReverse, iPosition:=0) + Case strNone + clsRaesFunction.AddParameter("colour", ucrFactorReceiver.GetVariableNames(False), iPosition:=0) + End Select + End If + End If + End If + End Sub + + Private Sub ucrPnlOptions_Control() Handles ucrPnlOptions.ControlValueChanged, ucrChkDisplayAsDotPlot.ControlValueChanged, ucrChkRidges.ControlValueChanged, ucrFactorReceiver.ControlValueChanged, ucrVariablesAsFactorforHist.ControlValueChanged, ucrInputAddReorder.ControlValueChanged toolStripMenuItemHistogramOptions.Enabled = rdoHistogram.Checked AndAlso Not ucrChkDisplayAsDotPlot.Checked toolStripMenuItemDotOptions.Enabled = rdoHistogram.Checked AndAlso ucrChkDisplayAsDotPlot.Checked toolStripMenuItemDensityOptions.Enabled = rdoDensity_ridges.Checked AndAlso Not ucrChkRidges.Checked @@ -270,6 +358,7 @@ Public Class dlgHistogram toolStripMenuItemFrequencyPolygonOptions.Enabled = rdoFrequencyPolygon.Checked SetDialogOptions() DialogueSize() + UpdateParameter() End Sub Private Sub Adding_Percentages(ucrChangedControl As ucrCore) Handles ucrInputStats.ControlValueChanged, ucrChkPercentages.ControlValueChanged @@ -366,20 +455,26 @@ Public Class dlgHistogram Private Sub DialogueSize() If rdoHistogram.Checked Then Me.Size = New Size(464, 409) - Me.ucrSaveHist.Location = New Point(10, 284) - Me.ucrBase.Location = New Point(10, 314) + Me.lblReorder.Location = New Point(283, 275) + Me.ucrInputAddReorder.Location = New Point(283, 289) + Me.ucrSaveHist.Location = New Point(10, 314) + Me.ucrBase.Location = New Point(10, 342) ElseIf rdoDensity_ridges.Checked Then - Me.Size = New Size(464, 433) - Me.ucrSaveHist.Location = New Point(10, 311) - Me.ucrBase.Location = New Point(10, 334) + Me.Size = New Size(464, 461) + Me.lblReorder.Location = New Point(286, 298) + Me.ucrInputAddReorder.Location = New Point(287, 314) + Me.ucrSaveHist.Location = New Point(10, 342) + Me.ucrBase.Location = New Point(10, 365) Else Me.Size = New Size(464, 401) - Me.ucrSaveHist.Location = New Point(10, 275) - Me.ucrBase.Location = New Point(10, 305) + Me.lblReorder.Location = New Point(283, 250) + Me.ucrInputAddReorder.Location = New Point(283, 264) + Me.ucrSaveHist.Location = New Point(10, 288) + Me.ucrBase.Location = New Point(10, 314) End If End Sub - Private Sub CoreControls_ControlContentsChanged() Handles ucrVariablesAsFactorforHist.ControlContentsChanged, ucrSaveHist.ControlContentsChanged, ucrFactorReceiver.ControlContentsChanged, ucrChkRidges.ControlContentsChanged + Private Sub CoreControls_ControlContentsChanged() Handles ucrVariablesAsFactorforHist.ControlContentsChanged, ucrSaveHist.ControlContentsChanged, ucrFactorReceiver.ControlContentsChanged, ucrChkRidges.ControlContentsChanged, ucrInputAddReorder.ControlContentsChanged TestOkEnabled() End Sub End Class \ No newline at end of file