Is it possible to change the Spin Button images?
If so how??
Hi,
There are no properties to set these button images. But you could change the appearance of the buttons using a DrawFilter or a CreationFilter.
Are you referring to the built-in spin buttons (SpinButtonDisplayStyle) or a set of SpinEditorButtons in the ButtonsRight or ButtonsLeft collection?
What do you want to change the images to? I assume you have a bitmap or other image file that you want to use to replace the images on these buttons?
If so, do your images fit inside the current size of the buttons? I don't think you can change the size of the buttons. You might be able to change the width of them with a CreationFilter, but the height is determined by the height of the control.
I am referring to the built in spin buttons. The powers that be dont like fact that the images are different sizes.
Different than what? Some other control's spin buttons?
I think in this case, you would need to use a DrawFilter, because it doesn't look like these images are in a separate element from the button itself.
If you haven't used a DrawFilter before, I recommend that you get the Infragistics UIElementViewer Utility. It will be a huge help.
By default, the button is themed, so in order to draw the arrows yourself you would first have to turn off themes. You could do that on the control by setting UseOsThemes to true. But that, in itself, is going to change the look of the arrows. And then you will probably want to set the ButtonStyle to find a style that looks like what you want.
Different then each other, the top button image shows a slightly larger image then the bottom button.
I will look at using a draw filter
Thanks
Hm, I'm not seeing that on mine. The images are the same size for me. Can you post a screen shot?
Notice the Spin Images.
By the way I am currently running version 10.2
Umm.. I don't see anything. Looks like the image link is broken.
You can attach an image file to your post by going to the Options tab when replying.
Elfmanne said:Where can I see the images used in the AppStylist for the spin buttons?
I tried this out in a sample and at the default height of the DateTimeEditor, the buttons look fine. The isl file is not applying any images to the spin buttons.
It looks like what's happening here is that the arrows are draw a little bit smaller when the height of the control does not allow the full arrow image to fit. At the default height, both arrows look the same, but if you turn off AutoSize and reduce the height of the control by a pixel, one of the arrows has to shrink to fit.
If you reduce the control's height by one more pixel, both arrows are drawn small so they are the same size.
So it seems to me that the easiest solution for you is to make the control either one pixel taller or one pixel shorter.
Mike,
Good catch, yes I actually am using the Office2007Blue.isl
Where can I see the images used in the AppStylist for the spin buttons?
I can certainly see why you wouldn't like that, it looks bad. That might be a bug.
That's not the default (themed) look.
Looks like one of the Office styles. Are you loading a Style Library (isl) file into your application?
If so, which one? Is it one of ours or did you make one of your own?
If not, then what is the DisplayStyle set to? I tried this out using all of the built-in DisplayStyle settings and I could not get it to look like this.
Try again...