so... after rebooting from Win to Linux.. here's a way to change the background of EVERY widget as you wish:
I'm using a gtkrc-file to achieve this... there is a way without.. but I'd never used that way...
1st: create a file with the following content:
Code: Select all
pixmap_path "./images"
style "container_style"
{
bg_pixmap[NORMAL] = "my_background.png"
bg[NORMAL] = {0.755, 0.755, 0.9555}
fg[NORMAL] = {0.000, 0.000, 0.000}
}
widget "*mycontainer" style "container_style"
adapt the image name and the path to the images.. if in the same directory, imagepath = "."
The image should be seamless as it is used to fill the gadget regardless of it's size
in your code you'll need the following lines
somewhere at startup
before creating the window/Gadget
Code: Select all
gtk_rc_parse_(rcfile);including path; best place is in the same dir as the executable
and the following line after the gadget is created
Code: Select all
gtk_widget_set_name_(GadgetID(<your_container_id>),"mycontainer")
if you made changes to your style, use
to re-read all used gtkrc-style files...
that's the easy way to change a widgets background and color...
To set a cursor you'll need the following:
Code: Select all
mycursor=gdk_cursor_new_(#GDK_WATCH )
gdk_window_set_cursor_(WindowID(hwnd) , mycursor)
but I can't get this to work... regarding the GDK documentation that's all you need to change a cursor :roll: