Python Forum
PyGTK3, I can't Change Button and Table Backgorund Color using modify_bg method.
Thread Rating:
  • 2 Vote(s) - 4 Average
  • 1
  • 2
  • 3
  • 4
  • 5
PyGTK3, I can't Change Button and Table Backgorund Color using modify_bg method.
#1
hello, i can't change button and table bakckground color using modify_bg method i don't know how can i change. 


my code...

import gi
gi.require_version("Gtk", "3.0")
from gi.repositroy import Gtk as gtk, Gdk as gdk

btn1 = gtk.Button("example")
btn1.modify_bg(gtk.StateType.NORMAL, gdk.color_parse("red") ) #not working 
Reply


Messages In This Thread
PyGTK3, I can't Change Button and Table Backgorund Color using modify_bg method. - by harun2525 - Mar-25-2017, 07:22 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  [Tkinter] how to make label or button not visible with the place method? nowayj63 2 2,856 Jan-03-2023, 06:29 PM
Last Post: Yoriz
  Can't change the colour of Tk button text Pilover 6 14,840 Nov-15-2022, 10:11 PM
Last Post: woooee
  [PyQt] [Solved]Change text color of one line in TextBrowser Extra 2 4,935 Aug-23-2022, 09:11 PM
Last Post: Extra
  [WxPython] [SOLVED] How to change button label? Winfried 3 2,110 May-31-2022, 06:37 PM
Last Post: Winfried
  Tkinter - How can I change the default Notebook border color? TurboC 5 14,816 May-23-2022, 03:44 PM
Last Post: bigmac
Question [Tkinter] Change Treeview column color? water 3 9,673 Mar-04-2022, 11:20 AM
Last Post: Larz60+
  Can't get tkinter button to change color based on changes in data dford 4 3,451 Feb-13-2022, 01:57 PM
Last Post: dford
  Tkinter menu font size -method to change tonycat 2 7,879 Oct-11-2020, 02:43 AM
Last Post: tonycat
  tkinter | Button color text on Click Maryan 2 3,405 Oct-09-2020, 08:56 PM
Last Post: Maryan
  [Tkinter] Trying to change font size w/o changing button size python63 3 9,894 Aug-05-2020, 01:04 AM
Last Post: Larz60+

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020