Issue 1041: MSGF+ Installation form does not copy text

issues
Status:open
Assigned To:Matt Chambers
Type:Defect
Area:Skyline
Priority:3
Milestone:24.2
Opened:2024-09-11 06:11 by Brendan MacLean
Changed:2024-09-12 06:52 by Matt Chambers
Resolved:
Resolution:
Closed:
2024-09-11 06:11 Brendan MacLean
Title»MSGF+ Installation form does not copy text
Assigned To»Matt Chambers
Notify»Nick Shulman
Type»Defect
Area»Skyline
Priority»3
Milestone»24.2
If you get through the File > Search > Run Peptide Search wizard to where you can choose MSGF+, you get a message form with a copy button, but when you click it you do not actually get the text in the form. Just the title and the buttons.

---------------------------
Download MS-GF+
---------------------------

---------------------------
&Yes &No
---------------------------

Is this specific to this use, or did we somehow break our MessageDlg/MultiButtonMessageDlg implementation so that it no longer copies the message text?

2024-09-11 06:16 Brendan MacLean
I answered my own question by trying 2 more messages that I know cover both MessageDlg and MultiButtonMessageDlg:

---------------------------
Skyline
---------------------------
You must save this document before running a peptide search.
---------------------------
OK Cancel
---------------------------

---------------------------
Skyline
---------------------------
There are no Panorama servers to upload to
Press Register to register for a project on PanoramaWeb.
Press Continue to use the server of your choice.
---------------------------
Register Continue Cancel
---------------------------

We probably want to strip the ampersands (&) out of the button text. Though, here I was surprised to find that the Register and Continue buttons do not have mnemonics. OK and Cancel never to, which is probably why we didn't notice this earlier. Yes and No normally do have mnemonics.

2024-09-12 05:37 Brendan MacLean
I see, it is this variant of MultiButtonMsgDlg:

public MultiButtonMsgDlg(Control ctl, string btnYesText, string btnNoText, bool allowCancel)

Where you can just put a Control on the form. You are going to need to create a subclass of control or a class that manages a control that can also provide its message as raw text.

Sometimes I am amazed what gets by our code review process. I know I am not reading it all, though.

2024-09-12 06:52 Matt Chambers
How about an extra parameter for that MultiButtonMessageDlg overload that creates a text representation of the control (kind of like an alt tag for an HTML element)? The idea of that overload is to allow calling code to show a simple dialog with a control that is filled out programmatically (rather than creating a subclass just to encapsulate that logic). Ironically, the only place using this overload now is passing in a control that's pure text, just laid out in a TableLayoutPanel. Does the copied text representation need to preserve the layout (hard to do without a monospace font)?