简体   繁体   English

TextImageRelation实现

[英]TextImageRelation Implementation

Does anyone know any information on implementing the TextImageRelation property on a button? 有谁知道在按钮上实现TextImageRelation属性的任何信息吗? Since it is impossible to paint a custom background without having to also paint the foreground, I need at least an idea of how the algorithm works. 由于不可能在不绘制前景的情况下绘制自定义背景,因此我至少需要对算法的工作原理有所了解。

I can't find any info on it. 我找不到任何信息。

Thanks 谢谢

Your question could use a few more details. 您的问题可以使用更多详细信息。 I presume you are talking about writing your own implementation of a ToolStripButton? 我想您正在谈论编写自己的ToolStripButton实现? MSDN has a pretty thorough example of how to implement a ToolStripItem (which is the basis for ToolStripButton), including how the TextImageRelation property would be used. MSDN上有一个非常详尽的示例,说明如何实现ToolStripItem(这是ToolStripButton的基础),包括如何使用TextImageRelation属性。 Look at the ComputeImageAndTextLayout() method in the example for specifics. 有关详细信息,请ComputeImageAndTextLayout()示例中的ComputeImageAndTextLayout()方法。 I don't understand from your question how the custom background & foreground painting is a problem. 从您的问题中我不明白自定义背景和前景的绘画是怎么一个问题。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM