I have a problem that happens with UltraNumericEditor and in Grid. When I enter edit mode with a click the number moves right beyond the control borders. Hier is an example:
https://jumpshare.com/v/3MFy9EZZqLGriTny44py
It doesn't happen if I set TextRenderingMode on GDI, but could I avoid it while using GDI+?
Would be grateful if you could hint me what can be the reason and how to change it.
Hello Kiril,
Unfortunately, I don’t think this could be avoided, since the cause of this problem is how the GDI+ renders the UltraNumericEditor. When the UltraNumericEditor is not in edit mode it is rendered by the GDI+, however when it is in edit mode it uses a TextBox control, which is rendered by GDI and this is why the issue with text shifting occurs. Actually this can be considered a general issue rather than Infragistics issue, since this is how GDI+ works, event though GDI+ performs better, using GDI may not actually affect considerably the performance of your application unless it is “text heavy”.
Regards, Ivan Kitanov
After a conversation with a colleague, with more experience in this field, it ended up that I misled you in my previous response. What I said was valid for text-based editors such as UltraComboEditor and UltraTextEditor, however controls such as UltraNumeric editor and the other mask-based controls draw the text every time whether the control is in edit mode or not.
According to him there are two possible solutions to your issue. The best and the simplest solution for an issue like this would be to simply make the control wide enough to fit the maximum value.
Another possible solution would be to set the SelectionStart property when the control gets focus and that should change the scrolling. But this is going to be very tricky for a few reasons. First, there’s probably going to be a timing issue. Second, it’s going to be hard to detect why the control is getting focus for example if it is simply tabbed into or it is actually being clicked on.