Hello,
I've got a couple Ultradropdownbuttons in a form. Wired up and working fine. The only issue is one of space. I need to get all the reduction in size I can out of this and to that end I would like to not show the dropdown arrow at all. The control is replacing a standard button and I'd like to have the Ultradropdownbutton take up the same screen real estate as the standard Ultrabutton with a 16x16 image and no text, no dropdown arrow. The buttons' style is set to DropDownButtonOnly.
Any ideas?
Hi Mike,
this works, thank you!
Best regards,
Daniel
Hi Daniel,
It looks like either the elements changes over the years, or else I made a mistake in my original code. I sed the wrong UIElement there. You have to use SplitButtonDropDownUIElement instead of SplitButtonUIElement.
public class MyDrawFilter : IUIElementDrawFilter{#region IUIElementDrawFilter Members public bool DrawElement(DrawPhase drawPhase, ref UIElementDrawParams drawParams){return true;} public DrawPhase GetPhasesToFilter(ref UIElementDrawParams drawParams){if (drawParams.Element is SplitButtonDropDownUIElement)return DrawPhase.BeforeDrawForeground; return DrawPhase.None;} #endregion}
public class MyDrawFilter : IUIElementDrawFilter{#region IUIElementDrawFilter Members
public bool DrawElement(DrawPhase drawPhase, ref UIElementDrawParams drawParams){return true;}
public DrawPhase GetPhasesToFilter(ref UIElementDrawParams drawParams){if (drawParams.Element is SplitButtonDropDownUIElement)return DrawPhase.BeforeDrawForeground;
return DrawPhase.None;}
#endregion}
i also need an UltraDropDownButton in our application, which can hide/show (or enable/disable) the drowdown-arrow on demand. I've tried your suggested the drawfilter-code, but it does not change the drawing-behaviour of the button, the arrow is still visible and accessable.
I'm also wondering which part of the filter does influence the arrow drawing. Or is this just a filter example and there is the code missing for hiding the arrow? Can you please give me an example then, how to hide or disable the drowdown-arrow?
Thank you and best regards,
Yes, Boris, I'm all set. Thanks.
Hello desertfoxmb,
I wanted to know if you were able to solve your issue based on these suggestions or you still need help. Please let me know.