Hello all,
I'm currently working with an Infragistics 11.2 UltraToolbarsManager. I have a custom user control that looks just like a combo box in the designer, but has overloaded functionality at run time. What I'm currently having issues with is that I've added a tool in the ControlContainer style to my UltraToolbarManager's toolbar.
I added my user control to the form, and then set the Control property on the tool to my user control. It appears correctly at runtime, and works as expected.. EXCEPT that it cuts off the bottom portion of my user control (only by a pixel or two). It hides enough of the border that I've had comments about it not looking quite right, and I have to agree.
Can anyone offer any suggestions on how to prevent this incorrect display behavior?
I've attached a sample solution that displays the issue I'm experiencing at runtime.
Thanks!
Hello,
Thank you for the detailed explanations and the sample. You could decrease the combo editor uielement's width by using a CreationFilter. Please try the following code:
class CF : IUIElementCreationFilter
{
public void AfterCreateChildElements(UIElement parent)
if (parent is UltraComboEditorUIElement)
parent.Rect = new Rectangle(parent.Rect.X, parent.Rect.Y, parent.Rect.Width, 21);
parent.ChildElements[0].Rect = new Rectangle(parent.Rect.X, parent.Rect.Y, parent.Rect.Width, 21);
}
public bool BeforeCreateChildElements(UIElement parent)
return false;
Then assign it to the control:
ultraComboEditor1.CreationFilter = new CF();
Please feel free to let me know if I misunderstood you or if you have any other questions.
Boris,
Thank you for the quick reply and solution. I actually found another way to get around this problem, which I achieved through the following steps:
I'm not sure if this was caused by runtime initialization of the base toolbar control, or if it had something to do with my combo box being nested inside of another user control. This is what worked for me.
Thanks again!