-
Notifications
You must be signed in to change notification settings - Fork 62
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Bug]: KryptonMessageBoxDefaultButton.Button2
doesn't work
#1837
Labels
area:toolkit
All issues related to the toolkit components.
bug
Something isn't working
regression
Something was working in a previous release, but isn't working now.
under investigation
This bug/issue is currently under investigation.
version:85-lts
All things to do with V85 LTS.
version:95
All things to do with V95.
version:100
All things to do with V100.
Milestone
Comments
Hi @ICloneableX, Thanks for posting. Possible solution (not tested yet) to set the focus at the end of the constructor
internal VisualMessageBoxForm(IWin32Window? showOwner, string? text, string? caption,
KryptonMessageBoxButtons buttons,
KryptonMessageBoxIcon icon,
KryptonMessageBoxDefaultButton defaultButton,
HelpInfo? helpInfo, bool? showCtrlCopy,
bool? showHelpButton,
bool? showCloseButton)
{
// Store incoming values
_text = CommonHelper.NormalizeLineBreaks(text ?? string.Empty);
_caption = caption;
_buttons = buttons;
_kryptonMessageBoxIcon = icon;
_defaultButton = defaultButton;
_helpInfo = helpInfo;
_showOwner = showOwner;
_showHelpButton = showHelpButton ?? (helpInfo != null);
_krtbNativeWindow = new();
// Create the form contents
InitializeComponent();
// Hookup the native window on the KRTB, only after IntializeComponent().
_krtbNativeWindow.AssignHandle(krtbMessageText.RichTextBox.Handle);
// Default Cursor for the KRTB when the cursors hovers over it
krtbMessageText.RichTextBox.Cursor = Cursors.Arrow;
// #1692 text font colour for input controls does not work correct on KMBees when using dark themes.
// Set the text colour to the one a control uses.
krtbMessageText.StateCommon.Content.Color1 = GlobalStaticValues.KryptonMessageBoxRichTextBoxTextColor;
// Update contents to match requirements
UpdateText();
UpdateIcon();
UpdateButtons();
UpdateDefault();
UpdateHelp();
UpdateTextExtra(showCtrlCopy);
// Finally calculate and set form sizing
UpdateSizing(showOwner);
ShowCloseButton(showCloseButton);
(AcceptButton as KryptonButton)?.Focus();
} |
giduac
added
version:85-lts
All things to do with V85 LTS.
version:100
All things to do with V100.
version:95
All things to do with V95.
labels
Nov 6, 2024
Smurf-IV
added
regression
Something was working in a previous release, but isn't working now.
area:toolkit
All issues related to the toolkit components.
labels
Nov 6, 2024
PWagner1
added
the
under investigation
This bug/issue is currently under investigation.
label
Nov 6, 2024
PWagner1
changed the title
[Bug]: KryptonMessageBoxDefaultButton.Button2 doesn't work
[Bug]: Nov 6, 2024
KryptonMessageBoxDefaultButton.Button2
doesn't work
PWagner1
removed
the
under investigation
This bug/issue is currently under investigation.
label
Nov 6, 2024
PWagner1
added
the
under investigation
This bug/issue is currently under investigation.
label
Nov 7, 2024
Merged
Merged
Smurf-IV
added a commit
that referenced
this issue
Nov 9, 2024
…xdefaultbuttonbutton2-doesnt-work-v85 * Resolved #1837 - V85
Smurf-IV
added a commit
that referenced
this issue
Nov 9, 2024
…xdefaultbuttonbutton2-doesnt-work * Resolve #1837 - V100
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
area:toolkit
All issues related to the toolkit components.
bug
Something isn't working
regression
Something was working in a previous release, but isn't working now.
under investigation
This bug/issue is currently under investigation.
version:85-lts
All things to do with V85 LTS.
version:95
All things to do with V95.
version:100
All things to do with V100.
Describe the bug
KryptonMessageBoxDefaultButton.Button2
orKryptonMessageBoxDefaultButton.Button3
doesn't work and button1 always gets the focus.To Reproduce
Expected behavior
Button2 (the No button in this case) should have the focus. However, button1 (Yes) gets the focus instead.
Desktop (please complete the following information):
The text was updated successfully, but these errors were encountered: