Table of Contents
************************************ *************************************************** *********************************
I have participated in the 2014 "Blog Star" selection. I think my article is helpful to you. Please cast your precious vote
GTK 2.0 When running in windows, a text box will appear Unable to enter problem. I searched a lot of information and found that this is a problem with version 2.0, but no good solution has been found yet. But using GTK3.0 has no effect. However, GTK3.0 did not find a suitable method for setting the background image of the control. Refer to the examples given online and use CSS to implement it (see the reference materials for details). However, it does not take effect when running under Windows. The specific reason is unknown:
Home Web Front-end HTML Tutorial GTK3.0 uses CSS to set the background color of the control_html/css_WEB-ITnose

GTK3.0 uses CSS to set the background color of the control_html/css_WEB-ITnose

Jun 24, 2016 am 11:51 AM

************************************************ *************************************************** **********************

I have participated in the 2014 "Blog Star" selection. I think my article is helpful to you. Please cast your precious vote

************************************ *************************************************** *********************************

GTK 2.0 When running in windows, a text box will appear Unable to enter problem. I searched a lot of information and found that this is a problem with version 2.0, but no good solution has been found yet. But using GTK3.0 has no effect. However, GTK3.0 did not find a suitable method for setting the background image of the control. Refer to the examples given online and use CSS to implement it (see the reference materials for details). However, it does not take effect when running under Windows. The specific reason is unknown:

/*  Compile with:   gcc -Wall -o backimage `pkg-config --cflags --libs gtk+-3.0` backimage.c */#include <gtk/gtk.h>int main(int argc, char *argv[]){  GtkWidget *window;/*----- CSS ----------- */  GtkCssProvider *provider;  GdkDisplay *display;  GdkScreen *screen;/*-----------------------*/  gtk_init (&argc, &argv);  window = gtk_window_new (GTK_WINDOW_TOPLEVEL);/*    gtk_window_set_default_size (GTK_WINDOW(window),                                 500, 300);*/  g_signal_connect (GTK_WIDGET(window),                    "destroy",                    G_CALLBACK (gtk_main_quit),                    NULL);/*------------- CSS  --------------------------------------------------------------------------------------------------*/  provider = gtk_css_provider_new ();  display = gdk_display_get_default ();  screen = gdk_display_get_default_screen (display);  gtk_style_context_add_provider_for_screen (screen,                                             GTK_STYLE_PROVIDER(provider),                                             GTK_STYLE_PROVIDER_PRIORITY_USER);  gtk_css_provider_load_from_data (GTK_CSS_PROVIDER (provider),                                     " GtkWindow {\n"                                                              "   background-image: url('abstract-blue-02.jpg');\n"                                        "}\n", -1, NULL);  g_object_unref (provider);/*----------------------------------------------------------------------------------------------------------------------*/  gtk_widget_show_all (window);  gtk_main ();return(0);}
Copy after login

GTK3.0Ubunスtu The installation command under the system is as follows:

apt-get install gtk3.0


References:

http://www.gtkforums.com/viewtopic.php?f=3&t=988&sid=b63d18d182917efd7e2b04eb8c5e50c1&start=15

Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot Article Tags

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

Difficulty in updating caching of official account web pages: How to avoid the old cache affecting the user experience after version update? Difficulty in updating caching of official account web pages: How to avoid the old cache affecting the user experience after version update? Mar 04, 2025 pm 12:32 PM

Difficulty in updating caching of official account web pages: How to avoid the old cache affecting the user experience after version update?

How do I use HTML5 form validation attributes to validate user input? How do I use HTML5 form validation attributes to validate user input? Mar 17, 2025 pm 12:27 PM

How do I use HTML5 form validation attributes to validate user input?

What is the purpose of the <iframe> tag? What are the security considerations when using it? What is the purpose of the <iframe> tag? What are the security considerations when using it? Mar 20, 2025 pm 06:05 PM

What is the purpose of the <iframe> tag? What are the security considerations when using it?

How to efficiently add stroke effects to PNG images on web pages? How to efficiently add stroke effects to PNG images on web pages? Mar 04, 2025 pm 02:39 PM

How to efficiently add stroke effects to PNG images on web pages?

What is the purpose of the <meter> element? What is the purpose of the <meter> element? Mar 21, 2025 pm 12:35 PM

What is the purpose of the <meter> element?

What are the best practices for cross-browser compatibility in HTML5? What are the best practices for cross-browser compatibility in HTML5? Mar 17, 2025 pm 12:20 PM

What are the best practices for cross-browser compatibility in HTML5?

What is the purpose of the <datalist> element? What is the purpose of the <datalist> element? Mar 21, 2025 pm 12:33 PM

What is the purpose of the <datalist> element?

What is the purpose of the <progress> element? What is the purpose of the <progress> element? Mar 21, 2025 pm 12:34 PM

What is the purpose of the <progress> element?

See all articles