Implementing TextImageRelation
Does anyone know any information about using the TextImageRelation property on a button? Since it is not possible to paint a custom background without having to paint the foreground, I need at least an idea of how the algorithm works.
I cannot find information on this.
thanks
Several details could be used in your question. I'm assuming you're talking about writing your own implementation of ToolStripButton? MSDN has a fairly detailed example of how to implement a ToolStripItem (which is the basis for a ToolStripButton), including using the TextImageRelation property. Look at the method ComputeImageAndTextLayout()
in the example for specifics. I don't understand from your question how the problem is with setting background and foreground.
a source to share