-
Notifications
You must be signed in to change notification settings - Fork 63
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]: KryptonNumericUpDown.TextAlign doesn't work properly #37
Comments
This has (at least) 2 issues |
Hi, (@Smurf-IV @Ahmed-Abdelhameed) I'd like to add some findings to this that I came across when using this control. If the keyboard-cursor is in the control and the mouse pointer is not over the control:
This behaviour also applies to other types of controls (Listbox / ComboBox / DomainUpDown, etc.) and is there (has been changed) since Win10. This has nothing todo with the Krypton controls. Standard Winforms Controls have the same behaviour. The KryptonNUD control does not have the ability (like the Winforms one) to position the cursor on the value with the mouse and start editing at the selected position (see video). Aligning the value left or right makes no difference. DP7bHlZzOc.mp4 |
@Smurf-IV |
Describe the bug
The alignment of the KryptonNumericUpDown's text doesn't work properly when the text is being edited. as shown in the gif below.
To Reproduce
As demonstrated below:
Center
by default).Expected behavior
The text alignment should be the same whether or not the text is being edited.
Screenshots
Desktop:
Additional context
The issue happens when the
TextAlign
property of the internal_numericUpDown
WinForms control doesn't match the text alignment set for the Krypton NUP control. This happens in two cases:Center
but_numericUpDown.TextAlign
isLeft
. This is probably caused by the following point anyway..Content.TextH
of a state (e.g.,StateCommon
) is changed, it doesn't affect theTextAlign
property.I noticed that the
TextAlign
property does set the_numericUpDown.TextAlign
property accordingly. But since the former has a[Browsable(false)]
attribute, I'm assuming it's not to be used, in favor of theTextH
property (which fails to update the_numericUpDown.TextAlign
property).So, the fix should be either to update
_numericUpDown.TextAlign
each timeTextH
is changed or ifTextAlign
is what should be used (I doubt it), make it visible and hideTextH
instead.The text was updated successfully, but these errors were encountered: