Hello,
I have a question about UltraTextEditor class. When in edit mode, as indicated in this thread:
https://infragistics.com/community/forums/t/6712.aspx
"The UltraTextEditor uses a .NET TextBox when in edit mode"
In such case, if I would like to have ability to influence how the control looks like during entering text to it, what could be done? I would like to change forecolor of the font, but I am unable to by setting it in the code. The forecolor is, for example, set to black, but I get it blue in the edit mode, when entering text. I guess, this is due to .NET taking over?
UltraWinEditors.dll, v15.1.20151.2132
There seems to be no UltraFormattedTextEditor class, was it relesed for this version?
Thank you
Hi Marcin,
You do not have to change the foreground color of the TextBox as the UltraTextEditor has such appearance property that controls this visual effect. According to your scenario, it has to be set only in edit mode. Here is a code snippet.
Hi Ivaylo,
Thank you for your message!
I tried adding these two methods, and checked in the debugger, if they are called, but it does not help. The font stays blue, when control is in edit mode.
From the linked thread in the forum, in the first post, Matt Snyder mentioned, that when in edit mode, UltrTextEditor uses .NET textBox. There are properties in .NET like SelectionColor, SelectionBackColor, however, they are not accessible in UltrTextEditor class, as I understand. Or, maybe there is a way of setting these properties before entering edit mode?
thank you,
Marcin
A quick note to the problem. I noticed, that the font color is connected to color of window theme underneath. So this is probably just an issue of transparency and possibly blending too.
See the attached sample on the bottom of my post and let me know how it behaves on your side. If you want to get access to the TextBox, you can handle ControlAdded event handler on the UltraTextEditor where in the arguments you can find the TextBox itself. You can also set to false UseOsThemes on the UltraTextEditor which will prevent applying the system colors on the appearance objects.
Thank you for the code sample. It works properly, when compiled with our dlls version 15, the font during editing is red, and when edit box looses focus it is reset to black.
In my problem, the edit box is part of Navigation panel, which Windows 7 places at the top of the window, and, unfortunately when with Aero theme, the backgroud is this bluish color glassy one. From what I have read so far, this is the problem without any good solution yet. When I changed theme, there was no problem with font color. So this is localized to Aero theme.
I considered moving the two controls from this navigation panel to some other location in the window, and then this problem was not occurring, when beneath the control was no this glassy-bluish background. However, I haven't tried to move all controls from navigational panel yet, and I am not sure, it is possible for these standard buttons "back" and 'fprward." This is though "hackish" solution and overall fix may look worse than this blue-colored font.
Meanwhile, I was informed, that our product is being upgraded to v17.1 and our team would have access to it from August. I guess this new version may have controls, that possibly would solve the problem better. So, I think, I will have the issue till then on hold.
Additionally, this may be helpful for others reading this thread:
- Tried to set "UseOsThemes" to False, but no luck with the font issue.
- Tried ControlAdded event handler, I set the control in arguments with ForeColor and BackColor, but this did not help. I will look for some other properties, but i haven't seen alpha blending options, alpha disabling or similar. I don't exactly know, how Aero theme does this font color problem.
Thank you for all your help so far!
Best regards,