Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
710
Centered Image and Text on a button
posted

I can create a column with a button in it (Infragistics.Win.UltraWinGrid.ColumnStyle.Button) and I can place both text and an image on the button.

 If the horizontal alignment is set to left for both the image and the button text, then the button text appears right to the right of the image.  This looks right to me.  But if I set the alignment to center for both, then the button appears on top of the text (or the other way around).  Obviously this looks terrible.

 How can I get the image and text to be side-by-side, but with there "combined width" centered on the button?  This would be the centered version of what you get with the left alignment option.

 

thanks 

Parents
No Data
Reply
  • 469350
    Verified Answer
    Offline posted

        There's no built-in way to do this, but you might be able to acheive what you want using a DrawFilter or CreationFilter. 

        If you are not familiar with these, check out the Infragistics KB for lots of articles and samples. There's a bit of a learning curve, but these kinds of filters are really powerful and worth learning.  

        Also, get the UIElementVeiwer utility. It's invaluable when dealing with UIElements.  Introducing the Infragistics UIElementViewer Utility

Children