From 67a29d4daac5e61c5ecd7318a925b9e4097a70db Mon Sep 17 00:00:00 2001 From: John Date: Tue, 6 Apr 2021 19:25:25 +0000 Subject: [PATCH] C2021-021 Set the Find/Replace button text, and tool tip based on whether the user has write privileges. --- PROMS/Volian.Controls.Library/StepTabRibbon.cs | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/PROMS/Volian.Controls.Library/StepTabRibbon.cs b/PROMS/Volian.Controls.Library/StepTabRibbon.cs index c1cbf25a..efb47c75 100644 --- a/PROMS/Volian.Controls.Library/StepTabRibbon.cs +++ b/PROMS/Volian.Controls.Library/StepTabRibbon.cs @@ -3120,6 +3120,15 @@ namespace Volian.Controls.Library //#endif #endregion + // C2021-021 change the tool tip for the Find and Find/Replace button based on the user's accessibility to the procedure. + // also change the text on the buttons to read either Find or Find/Replace + public void ToggleFindReplaceToolTip(bool isReviewer) + { + string tipMsg = string.Format("Find {0} [Ctrl] [F]", isReviewer ? "" : "/ Replace"); + superTooltipRibbon.SetSuperTooltip(btnReviewFind, new DevComponents.DotNetBar.SuperTooltipInfo(tipMsg, "", "", null, null, DevComponents.DotNetBar.eTooltipColor.Gray)); + superTooltipRibbon.SetSuperTooltip(btnFindRplDlg, new DevComponents.DotNetBar.SuperTooltipInfo(tipMsg, "", "", null, null, DevComponents.DotNetBar.eTooltipColor.Gray)); + btnFindRplDlg.Text = btnReviewFind.Text = (isReviewer)?"Find": "Find /\r\nReplace"; + } public void SetupReviewerMode() { if (MyEditItem != null && MyEditItem.MyStepPanel.VwMode == E_ViewMode.Edit)