开发者

SWT - Can i custom draw the background of a Text control?

开发者 https://www.devze.com 2023-02-10 10:02 出处:网络
... I want to draw some info icon in the background of a text control. I know about the 开发者_如何学Cpaint event, but believe, if I do this, the entered text lies behind my custom drawn icon, not a

... I want to draw some info icon in the background of a text control.

I know about the 开发者_如何学Cpaint event, but believe, if I do this, the entered text lies behind my custom drawn icon, not above.


You have to write the text again. Just calculate its X and Y and use gc.drawText to write it over the original text.

0

精彩评论

暂无评论...
验证码 换一张
取 消