Hi,
I am currently using a UltraComboEditor (Infragistics 14.2 Win CLR4x ) in my winform program. However, when I set the UCE border to rounded, there appear to be a square background behind it, as shown in the attached file, how can I remove that?
Thanks.
Hello YeeYong,
I was able to reproduce the UltraComboEditor rounded border displaying a square background behind it issue. There is a possibility of removing this square background using a DrawFilter.
You can refer to the attached DrawFilter sample on how to implement this.
Please let me know if I may be of further assistance.
Sincerely,Sahaja KokkalagaddaAssociate Software Developer
Hi Sahaja,
I implemented the attached example, but the square background is not eliminated. Is there some properties I should be aware of ? Please advice, thanks.
By assigning the RoundedCornersDrawFilter to the UltraComboEditor you can make its corners rounded. There is no other property that needs to be set on the UltraComboEditor in order to achieve this.
Please send me a sample with this issue reproduced in it. This can be done by creating a new sample or by modifying the existing sample.
I will further look into this issue as soon as I receive the sample.
It seems that the UltraComboEditor inside my MenuStrip control was unable to render the draw filter properly, but after moving the UCE into a panel control (on top of my MenuStrip control), it works. I could not reproduce (or figure out why) this issue in a separate project, as it works without problem with just the UCE stacked on top of the Menu Strip. I am unable to send you the sample project as it is too big, however, if i manage to reproduce the issue, I will upload it here.
Thanks,Tan
I’m glad that you were able to resolve this issue by moving the UltraComboEditor into a panel. The hierarchy of UIElements will be different depending on the containing controls. Based on the order of UIElements the DrawFilter has to be modified. You can see the order of underlying UIElements when using a MenuStrip as a containing control for UltraComboEditor using UltraSpy. You can use UltraSpy and more specifically it sub utility UIElementViewer to see what UI Elements are active at any given time. UltraSpy is a stand-alone application, that you select one of its functions, then drag the crosshair onto an application and it will “spy” the application. NOTE: This application will use injection to embed into the application to be spied, which in most scenarios will need to be run as Administrator. I will send link to download UltraSpy using private case(CAS-185826-G4G8V2 ) I created from this thread.
Additionally you can add the Infragistics.Win.UltraSpy.EXE as a reference to an application, and manually create and show the UIElementViewer dialog.
By modifying the DrawFilter code I provided to use the correct UIElements you can resolve this issue.
Thank you for choosing Infragistics.
Sorry for the late reply. I tried using the UltraSpy program to get the hierarchy of the UIElements particularly for the UltraComboEditor control used in my program. However, I kept getting exception even when I run my program under Administrator mode. Below is the exception log:
************** Exception Text **************System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.NotSupportedException: The invoked member is not supported in a dynamic assembly. at System.Reflection.Emit.InternalAssemblyBuilder.GetExportedTypes() at Infragistics.Win.UIElementViewer.WinTypeInfo.GetType(String typename) at Infragistics.Win.UIElementViewer.WinTypeInfo.get_IUltraControlElementType() at Infragistics.Win.UIElementViewer.WinTypeInfo.CanGetControlElement(Type objectType) at Infragistics.Win.UIElementViewer.UIElementViewerControl.UltraControlFromPoint(Point screenPt) at Infragistics.Win.UIElementViewer.UIElementViewerControl.ProcessCurrentPoint(Boolean drawOnScreen, Boolean forceControlTreeRefresh) --- End of inner exception stack trace --- at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor) at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments) at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) at Infragistics.Win.UltraSpy.Lib.UIElementViewerControlView.ProcessCurrentPoint() at Infragistics.Win.UltraSpy.BaseSpyForm.OnLoad(EventArgs e) at System.Windows.Forms.Form.OnCreateControl() at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible) at System.Windows.Forms.Control.CreateControl() at System.Windows.Forms.Control.WmShowWindow(Message& m) at System.Windows.Forms.Control.WndProc(Message& m) at System.Windows.Forms.ScrollableControl.WndProc(Message& m) at System.Windows.Forms.Form.WmShowWindow(Message& m) at System.Windows.Forms.Form.WndProc(Message& m) at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m) at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m) at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
And by adding IUltraSpy.EXE as a reference in my application, and manually create and show the UIElementViewer dialog, do you mean execute the exe inside my program?
Furthermore, is it possible you could further elaborate how the hierarchy of my UltraComboEditor affects the given DrawFilter code?
Thanks!
Running UltraSpy is tricky sometimes. The order of the tools that should be run is like this:
1. Run your application.2. Run UltraSpy as administrator.3. Drop the watch on to your control to load the UIElements into UltraSpy.
Yes, I suggested you to add IUltraSpy.exe as a reference to your application to manually create and show the UIElementViewer.
The hierarchy of containing controls on Which UltraComboEditor is placed will affect the DrawFilter code because the UIElement tree through which we iterate will be different. For example, if UltraComboEditor is added directly to the Form it will be under Forms child elements. Instead if a Panel is added to the Form and UltraComboEditor is added on top of it then Panel will be child element of Form and UltraComboEditor will be child of Panel. Based on this hierarchy we have to navigate through the UIElements of a Form to get to the relative UIElement that we want to edit using DrawFilter.
Please let me know if you have any questions.