如何删除GTK条目(文本框)边框?

时间:2018-03-24 16:38:52

标签: css c user-interface gtk gtk3

我希望那里没有边界。我尝试了以下代码:

     GtkCssProvider *provider = gtk_css_provider_new ();
gtk_css_provider_load_from_data (GTK_CSS_PROVIDER (provider), 
"entry, .entry, GtkEntry { border-width:0px ; }", 
-1, NULL); 

GdkDisplay *display = gdk_display_get_default ();
GdkScreen *screen = gdk_display_get_default_screen (display);
gtk_style_context_add_provider_for_screen (screen, GTK_STYLE_PROVIDER     
         (provider), GTK_STYLE_PROVIDER_PRIORITY_APPLICATION);

1 个答案:

答案 0 :(得分:1)

我用entry { border:none }

修复了它