Hi,
I'm using UltraOptionSet.
I want that its text will be on its left side instead of its right side.
How can I do this?
Thanks,Yael
Did you modify the code I posted here? I tested this in an OptionSet with 5 items and it worked fine for me with no overlap.
Maybe you could post a small sample project demonstrating the behavior you are getting.
It works for one option only.. If I add 2nd option, it overlapes on first..
what to do now??
Here's some sample code that centers the items within the control. I think it looks kinda weird, but if that's what you want, this should do it.
public class MyCreationFilter : IUIElementCreationFilter { void IUIElementCreationFilter.AfterCreateChildElements(UIElement parent) { if (parent is OptionSetEmbeddableUIElement) { foreach (UIElement element in parent.ChildElements) { if (element is OptionSetOptionButtonUIElement) { Rectangle rect = element.Rect; DrawUtility.AdjustHAlign(HAlign.Center, ref rect, parent.RectInsideBorders); element.Rect = rect; } } } } bool IUIElementCreationFilter.BeforeCreateChildElements(UIElement parent) { // Do nothing return false; } }
It's still not clear to me exactly what you want. You want the text and the radio button both to be centered? Seems like a very strange UI to me. The radio buttons would not be lined up and you would have sort've jagged edges on both sides. That's really what you want?
Yes, I want radio button with text in center horizontally.
And I don't have idea of CreationFilter. Can you show me some code for this?