Find the answer to your Linux question:
Results 1 to 1 of 1
Hi everybody, I've a problem for changing a background in my program ! First, I read RC files. That works well. My png file is bigger than the area where ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Aug 2012
    Posts
    1

    Gtk RC Style


    Hi everybody,

    I've a problem for changing a background in my program !

    First, I read RC files. That works well. My png file is bigger than the area where I display it and with option STRETCH = TRUE in RC file everything is OK.

    But after, during my program, I've to change the background by reading another png file.

    Below is my code :
    Code:
    Glib::RefPtr<Gtk::RcStyle> style = myWidget.get_modifier_style();
    style->set_bg_pixmap_name(Gtk::STATE_NORMAL, my_new_file.png);
    myWidget->modify_style(style);
    In that case, the background never changes !!!
    I also tried to create a new RcStyle :
    Code:
    Glib::RefPtr<Gtk::RcStyle> style = Gtk::RcStyle::create();
    style->set_bg_pixmap_name(Gtk::STATE_NORMAL, my_new_file.png);
    myWidget->modify_style(style);
    In that case, the new png file is displayed but not stretched !!!
    What is wrong in my program ?
    Has someboby a solution ?

    Thanks a lot for your answers...
    Last edited by thm-devt; 08-30-2012 at 02:32 PM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •