From 95115f445d9825c3c01759b262dbcc09ad9cd3ed Mon Sep 17 00:00:00 2001 From: mschill Date: Thu, 15 Oct 2026 14:25:49 -0400 Subject: [PATCH] B2026-078 Hide Delete and Open Button for Library Documents with any occurrences. --- .../Volian.Controls.Library/DisplayLibDocs.cs | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/PROMS/Volian.Controls.Library/DisplayLibDocs.cs b/PROMS/Volian.Controls.Library/DisplayLibDocs.cs index 0d8dda9c..5b49f4b4 100644 --- a/PROMS/Volian.Controls.Library/DisplayLibDocs.cs +++ b/PROMS/Volian.Controls.Library/DisplayLibDocs.cs @@ -29,9 +29,9 @@ namespace Volian.Controls.Library public DisplayLibDocs() { InitializeComponent(); - btnOpenLibDoc.Enabled = false; - btnDelLibDoc.Enabled = false; - btnPrint.Enabled = listBoxLibDocs.Items.Count > 0; + btnOpenLibDoc.Visible = btnOpenLibDoc.Enabled = false; + btnDelLibDoc.Visible = btnDelLibDoc.Enabled = false; + btnPrint.Enabled = listBoxLibDocs.Items.Count > 0; saveGroupPanelUsages = groupPanelUsages.Style.BackColor; } DisplayTabControl _DisplayTabControl; @@ -107,14 +107,14 @@ namespace Volian.Controls.Library groupPanelUsages.Style.BackColor = dicnt.LibraryDocumentUsageList == null || dicnt.LibraryDocumentUsageList.Count == 0 ? this.saveGroupPanelUsages : Color.LightGreen; if (iil == null) { - btnDelLibDoc.Enabled = true; - btnOpenLibDoc.Enabled = true; - return; + btnOpenLibDoc.Visible = btnOpenLibDoc.Enabled = true; + btnDelLibDoc.Visible = btnDelLibDoc.Enabled = true; + return; } - // Put the usages in the usage list for the selected library document. - btnDelLibDoc.Enabled = false; - btnOpenLibDoc.Enabled = false; - foreach (ItemInfo ii in dicnt.LibraryDocumentUsageList) + // Put the usages in the usage list for the selected library document. + btnOpenLibDoc.Visible = btnOpenLibDoc.Enabled = false; + btnDelLibDoc.Visible = btnDelLibDoc.Enabled = false; + foreach (ItemInfo ii in dicnt.LibraryDocumentUsageList) { if (ii.MyDocVersion != null) listBoxUsages.Items.Add($"{ii.MyProcedure} - {ii.DisplayNumber} {ii.DisplayText}");