Is there a way to specify a size and custom image for the ScrollButtons of a UltraTabbedMdiManager?
I seem to be able to set the ScrollArrowStyle, the BackgroundColor en when to show the ScrollButtons, but not the size and image of them... (in the TabGroupSettings).
Thx, Lieven Cardoen
Hi,
It works, but the size is still 16x16px and my images are 30x30px.
Any idea?
thx, Lieven
Thx, trying it out as we speak.
Lieven
Hi Lieven,
Yes, this is exactly what you should do. Send two images to the draw filter, then check the type of the button and assign the correct image. You can use code like this in DrawElement method:
SpinScrollButtonUIElement spinScrollButtonElement = drawParams.Element as SpinScrollButtonUIElement;if(spinScrollButtonElement != null){ if(drawPhase == DrawPhase.BeforeDrawForeground) return true; switch(spinScrollButtonElement.ScrollButtonType) { case System.Windows.Forms.ScrollButton.Left: drawParams.AppearanceData.ImageBackground = this.prevButtonImage; break; case System.Windows.Forms.ScrollButton.Right: drawParams.AppearanceData.ImageBackground = this.nextButtonImage; break; } drawParams.AppearanceData.ImageBackgroundStyle = ImageBackgroundStyle.Stretched;} return false;
Attached is a changed version of my sample, where I am setting different images for previous and next arrows.
Please, let me know if you need any further assistance with this matter.
MIko,
Thx for the quick answer. I'll try it out.
If I want a left arrow and a right arrow, do I have to pass two images to the draw filter? How do I do this?
thx, L.
Hello Lieven,
There is no direct way to add images to the scroll buttons of UltraTabbedMdiManger. What you can do is add your images with custom DrawFilter. Regarding the size of the buttons this could be achieved by implementing a custom CreationFilter, but this will not be a trivial task as you will generally speaking recreate the entire control.
Attached is a small sample showing how you can set a background image for each button. Please check my sample and let me know if this is what you are looking for or if I am missing something.