简体   繁体   English

如何使用Mono在GTK#TextView中设置透明背景?

[英]How can I set a transparent background in a GTK# TextView using Mono?

I have a Gtk.Window with a background image. 我有一个带背景图像的Gtk.Window。 It is filled with TextViews mostly in Paned widgets. 它主要在Paned小部件中填充TextView。 I want the TextViews to have a transparent background. 我希望TextViews具有透明背景。 Ideally, black with half alpha, but I can live with a fully transparent background. 理想情况下,黑色半阿尔法,但我可以生活在完全透明的背景。 Does anyone know if this is possible? 有谁知道这是否可能? Is there maybe a way to override some kind of DrawBackground in a custom TextView subclass? 有没有办法在自定义TextView子类中覆盖某种DrawBackground?

I don't use C# just simple gtk with c++. 我不使用C#只是简单的gtk和c ++。 This should help 这应该有所帮助

view=gtk_text_view_new ();
gtk_widget_set_opacity (view,0.2);

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

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