From 76523adada34034d1a0a4a1f12cecec51a0c7817 Mon Sep 17 00:00:00 2001 From: Derrick Agorhom <76208189+derekagorhom@users.noreply.github.com> Date: Wed, 13 Nov 2024 11:10:23 +0100 Subject: [PATCH] Created a dropdown for the Dataview button --- instat/frmMain.Designer.vb | 114 ++++++++++++++++++++++--------------- instat/frmMain.vb | 7 ++- 2 files changed, 71 insertions(+), 50 deletions(-) diff --git a/instat/frmMain.Designer.vb b/instat/frmMain.Designer.vb index 51e2ae14d7..1ace18cf46 100644 --- a/instat/frmMain.Designer.vb +++ b/instat/frmMain.Designer.vb @@ -405,7 +405,9 @@ Partial Class frmMain Me.toolStripSeparator = New System.Windows.Forms.ToolStripSeparator() Me.mnuTbLast10Dialogs = New System.Windows.Forms.ToolStripSplitButton() Me.separator2 = New System.Windows.Forms.ToolStripSeparator() - Me.mnuTbDataView = New System.Windows.Forms.ToolStripButton() + Me.mnuTbDataView = New System.Windows.Forms.ToolStripSplitButton() + Me.mnuDataViewWindow = New System.Windows.Forms.ToolStripMenuItem() + Me.mnuRDataViewerWindow = New System.Windows.Forms.ToolStripMenuItem() Me.mnuTbOutput = New System.Windows.Forms.ToolStripSplitButton() Me.mnuOutputWindow = New System.Windows.Forms.ToolStripMenuItem() Me.mnuShowRCommand = New System.Windows.Forms.ToolStripMenuItem() @@ -426,6 +428,11 @@ Partial Class frmMain Me.ToolStripSeparator76 = New System.Windows.Forms.ToolStripSeparator() Me.mnuTbResetLayout = New System.Windows.Forms.ToolStripButton() Me.separator3 = New System.Windows.Forms.ToolStripSeparator() + Me.mnuTbHelp = New System.Windows.Forms.ToolStripSplitButton() + Me.mnuToolBarHelp = New System.Windows.Forms.ToolStripMenuItem() + Me.mnuDataWindowHelp = New System.Windows.Forms.ToolStripMenuItem() + Me.mnuOutputHelp = New System.Windows.Forms.ToolStripMenuItem() + Me.mnuLogScriptHelp = New System.Windows.Forms.ToolStripMenuItem() Me.ToolStripSeparator77 = New System.Windows.Forms.ToolStripSeparator() Me.mnuTbLan = New System.Windows.Forms.ToolStripButton() Me.separator1 = New System.Windows.Forms.ToolStripSeparator() @@ -703,11 +710,6 @@ Partial Class frmMain Me.mnuDataFrameMetadata = New System.Windows.Forms.ToolStripMenuItem() Me.mnuScriptFile = New System.Windows.Forms.ToolStripMenuItem() Me.mnuLogFile = New System.Windows.Forms.ToolStripMenuItem() - Me.mnuTbHelp = New System.Windows.Forms.ToolStripSplitButton() - Me.mnuToolBarHelp = New System.Windows.Forms.ToolStripMenuItem() - Me.mnuDataWindowHelp = New System.Windows.Forms.ToolStripMenuItem() - Me.mnuOutputHelp = New System.Windows.Forms.ToolStripMenuItem() - Me.mnuLogScriptHelp = New System.Windows.Forms.ToolStripMenuItem() Me.stsStrip.SuspendLayout() Me.Tool_strip.SuspendLayout() Me.mnuBar.SuspendLayout() @@ -3199,15 +3201,31 @@ Partial Class frmMain ' 'mnuTbDataView ' - Me.mnuTbDataView.CheckOnClick = True Me.mnuTbDataView.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image + Me.mnuTbDataView.DropDownButtonWidth = 18 + Me.mnuTbDataView.DropDownItems.AddRange(New System.Windows.Forms.ToolStripItem() {Me.mnuDataViewWindow, Me.mnuRDataViewerWindow}) Me.mnuTbDataView.Image = Global.instat.My.Resources.Resources.dataframe2 Me.mnuTbDataView.ImageTransparentColor = System.Drawing.Color.Magenta Me.mnuTbDataView.Margin = New System.Windows.Forms.Padding(2, 1, 2, 2) Me.mnuTbDataView.Name = "mnuTbDataView" - Me.mnuTbDataView.Size = New System.Drawing.Size(34, 34) + Me.mnuTbDataView.Size = New System.Drawing.Size(53, 34) Me.mnuTbDataView.ToolTipText = "Toggle Data view open and closed" ' + 'mnuDataViewWindow + ' + Me.mnuDataViewWindow.ImageScaling = System.Windows.Forms.ToolStripItemImageScaling.None + Me.mnuDataViewWindow.Name = "mnuDataViewWindow" + Me.mnuDataViewWindow.Size = New System.Drawing.Size(180, 22) + Me.mnuDataViewWindow.Text = "Data View" + ' + 'mnuRDataViewerWindow + ' + Me.mnuRDataViewerWindow.Enabled = False + Me.mnuRDataViewerWindow.ImageScaling = System.Windows.Forms.ToolStripItemImageScaling.None + Me.mnuRDataViewerWindow.Name = "mnuRDataViewerWindow" + Me.mnuRDataViewerWindow.Size = New System.Drawing.Size(180, 22) + Me.mnuRDataViewerWindow.Text = "R-Data Viewer" + ' 'mnuTbOutput ' Me.mnuTbOutput.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image @@ -3360,6 +3378,44 @@ Partial Class frmMain Me.separator3.Name = "separator3" Me.separator3.Size = New System.Drawing.Size(6, 37) ' + 'mnuTbHelp + ' + Me.mnuTbHelp.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image + Me.mnuTbHelp.DropDownButtonWidth = 18 + Me.mnuTbHelp.DropDownItems.AddRange(New System.Windows.Forms.ToolStripItem() {Me.mnuToolBarHelp, Me.mnuDataWindowHelp, Me.mnuOutputHelp, Me.mnuLogScriptHelp}) + Me.mnuTbHelp.Image = Global.instat.My.Resources.Resources.help2 + Me.mnuTbHelp.ImageTransparentColor = System.Drawing.Color.Magenta + Me.mnuTbHelp.Name = "mnuTbHelp" + Me.mnuTbHelp.Size = New System.Drawing.Size(53, 34) + Me.mnuTbHelp.Text = "LogScript" + Me.mnuTbHelp.ToolTipText = "Help Window" + ' + 'mnuToolBarHelp + ' + Me.mnuToolBarHelp.ImageScaling = System.Windows.Forms.ToolStripItemImageScaling.None + Me.mnuToolBarHelp.Name = "mnuToolBarHelp" + Me.mnuToolBarHelp.Size = New System.Drawing.Size(173, 22) + Me.mnuToolBarHelp.Text = "Toolbar Help" + ' + 'mnuDataWindowHelp + ' + Me.mnuDataWindowHelp.ImageScaling = System.Windows.Forms.ToolStripItemImageScaling.None + Me.mnuDataWindowHelp.Name = "mnuDataWindowHelp" + Me.mnuDataWindowHelp.Size = New System.Drawing.Size(173, 22) + Me.mnuDataWindowHelp.Text = "Data Window Help" + ' + 'mnuOutputHelp + ' + Me.mnuOutputHelp.Name = "mnuOutputHelp" + Me.mnuOutputHelp.Size = New System.Drawing.Size(173, 22) + Me.mnuOutputHelp.Text = "Output Help" + ' + 'mnuLogScriptHelp + ' + Me.mnuLogScriptHelp.Name = "mnuLogScriptHelp" + Me.mnuLogScriptHelp.Size = New System.Drawing.Size(173, 22) + Me.mnuLogScriptHelp.Text = "Log Script Help" + ' 'ToolStripSeparator77 ' Me.ToolStripSeparator77.Name = "ToolStripSeparator77" @@ -5250,44 +5306,6 @@ Partial Class frmMain Me.mnuLogFile.Text = "Log Window..." Me.mnuLogFile.ToolTipText = "Log Window" ' - 'mnuTbHelp - ' - Me.mnuTbHelp.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image - Me.mnuTbHelp.DropDownButtonWidth = 18 - Me.mnuTbHelp.DropDownItems.AddRange(New System.Windows.Forms.ToolStripItem() {Me.mnuToolBarHelp, Me.mnuDataWindowHelp, Me.mnuOutputHelp, Me.mnuLogScriptHelp}) - Me.mnuTbHelp.Image = Global.instat.My.Resources.Resources.help2 - Me.mnuTbHelp.ImageTransparentColor = System.Drawing.Color.Magenta - Me.mnuTbHelp.Name = "mnuTbHelp" - Me.mnuTbHelp.Size = New System.Drawing.Size(53, 34) - Me.mnuTbHelp.Text = "LogScript" - Me.mnuTbHelp.ToolTipText = "Help Window" - ' - 'mnuToolBarHelp - ' - Me.mnuToolBarHelp.ImageScaling = System.Windows.Forms.ToolStripItemImageScaling.None - Me.mnuToolBarHelp.Name = "mnuToolBarHelp" - Me.mnuToolBarHelp.Size = New System.Drawing.Size(180, 22) - Me.mnuToolBarHelp.Text = "Toolbar Help" - ' - 'mnuDataWindowHelp - ' - Me.mnuDataWindowHelp.ImageScaling = System.Windows.Forms.ToolStripItemImageScaling.None - Me.mnuDataWindowHelp.Name = "mnuDataWindowHelp" - Me.mnuDataWindowHelp.Size = New System.Drawing.Size(180, 22) - Me.mnuDataWindowHelp.Text = "Data Window Help" - ' - 'mnuOutputHelp - ' - Me.mnuOutputHelp.Name = "mnuOutputHelp" - Me.mnuOutputHelp.Size = New System.Drawing.Size(180, 22) - Me.mnuOutputHelp.Text = "Output Help" - ' - 'mnuLogScriptHelp - ' - Me.mnuLogScriptHelp.Name = "mnuLogScriptHelp" - Me.mnuLogScriptHelp.Size = New System.Drawing.Size(180, 22) - Me.mnuLogScriptHelp.Text = "Log Script Help" - ' 'frmMain ' Me.AutoScaleDimensions = New System.Drawing.SizeF(96.0!, 96.0!) @@ -5687,7 +5705,6 @@ Partial Class frmMain Friend WithEvents mnuClimaticCMSAFPlotRegion As ToolStripMenuItem Friend WithEvents mnuPrepareColumnDateInfillMissingDates As ToolStripMenuItem Friend WithEvents mnuTbOpenFromLibrary As ToolStripButton - Friend WithEvents mnuTbDataView As ToolStripButton Friend WithEvents separator3 As ToolStripSeparator Friend WithEvents mnuTbResetLayout As ToolStripButton Friend WithEvents mnuTbOpen As ToolStripSplitButton @@ -6017,4 +6034,7 @@ Partial Class frmMain Friend WithEvents mnuDataWindowHelp As ToolStripMenuItem Friend WithEvents mnuOutputHelp As ToolStripMenuItem Friend WithEvents mnuLogScriptHelp As ToolStripMenuItem + Friend WithEvents mnuTbDataView As ToolStripSplitButton + Friend WithEvents mnuDataViewWindow As ToolStripMenuItem + Friend WithEvents mnuRDataViewerWindow As ToolStripMenuItem End Class diff --git a/instat/frmMain.vb b/instat/frmMain.vb index c65a21370f..968b5814c4 100644 --- a/instat/frmMain.vb +++ b/instat/frmMain.vb @@ -303,7 +303,7 @@ Public Class frmMain mnuDataFrameMetadat.Checked = False mnuSwapDataLogScript.Checked = False mnuSwapDataMetadata.Checked = False - mnuTbDataView.Checked = True + mnuDataViewWindow.Checked = True mnuOutputWindow.Checked = True mnuLogScript.Checked = False UpdateLayout() @@ -364,7 +364,7 @@ Public Class frmMain MsgBox(ex.Message) End Try - mnuTbDataView.Checked = mnuViewDataView.Checked + mnuDataViewWindow.Checked = mnuViewDataView.Checked mnuOutputWindow.Checked = mnuViewOutput.Checked mnuLogScript.Checked = mnuViewLogScript.Checked End Sub @@ -1832,8 +1832,9 @@ Public Class frmMain dlgInfill.ShowDialog() End Sub - Private Sub mnuDataView_Click(sender As Object, e As EventArgs) Handles mnuTbDataView.Click + Private Sub mnuDataView_Click(sender As Object, e As EventArgs) Handles mnuTbDataView.ButtonClick, mnuDataViewWindow.Click mnuViewDataView.Checked = Not mnuViewDataView.Checked + mnuDataViewWindow.Checked = mnuViewDataView.Checked UpdateLayout() End Sub