glade

Checkbox with CSS in GLade Python

99封情书 提交于 2019-12-12 13:44:59
问题 everyone I am trying to change the colors of the checkboxes when they are pressed because I am doing a job that requires their use. I am using them with no "Drawing Indicator" attribute, so I need them to have a different color when pressed, because it does not look very well and is not very appealing. Is there any way to do this? The version of my glade is 3.18.3. Im using a Pi3 model B This is my code: import gi gi.require_version('Gtk', '3.0') from gi.repository import Gtk from gi

Glade-constructed TreeView with gtkmm

点点圈 提交于 2019-12-12 13:14:27
问题 I've got a glade-constructed TreeView/ListStore that I'm trying to load into an application and manipulate via gtkmm. Here's the manager's class: typedef struct { Gtk::ListStore *liststore_info; Gtk::TreeModelColumn<string> *treeview_info_column_time; Gtk::TreeModelColumn<string> *treeview_info_column_message; }UiElements; class GuiManager { Glib::RefPtr<Gtk::Builder> builder; UiElements elements; public: GuiManager(); ~GuiManager(); void info_handler(string msg); } And the implementation:

Adding custom widget to GLADE

青春壹個敷衍的年華 提交于 2019-12-12 12:35:44
问题 Hi am using gtk3 and glade 3.14...I want to add a custom widget to glade so that i can add that to my user interface easily. I found knob widget is missing in glade and i found knob widget in http://sourceforge.net/projects/giw/ I downloaded and installed instrumentation widgets but it wont get added to Glade. Is a knob widget available in glade. I tried using the knob.c and knob.h file and tried example and got some examples working but couldn't integrate them to gade. 回答1: What you need is

Load GUI from a Glade with GtkSourceView in PyGObject

隐身守侯 提交于 2019-12-12 08:37:31
问题 I'm trying to use a Glade file that has a GtkSourceView widget in PyGObject. I've wrote a little guide on how to start using the new GtkSourceView 3.0 in Glade: http://cjenkins.wordpress.com/2012/05/08/use-gtksourceview-widget-in-glade/ The problem is when I want to load that Glade from PyGObject: from gi.repository import Gtk, GtkSource from os.path import abspath, dirname, join WHERE_AM_I = abspath(dirname(__file__)) class MyApp(object): def __init__(self): self.builder = Gtk.Builder() self

Templating overflowing content with glade and pygtk?

我们两清 提交于 2019-12-12 06:43:07
问题 I'm trying to develop a "multitrack" GUI (similar to multitrack audio editors); however, I'd like to develop it in glade first, and check how overflowing content (in this case, multiple "tracks") will behave with scollbars. Then, upon instantiation in Python, I'd first like to take the first of these "multiple tracks" as a "template", then delete all these multiple "tracks" - then allow the user to add new ones based on the "template" by, say, clicking an "Add" button. From the Gtk palette,

Glade 3 Standard Button Layout

谁说我不能喝 提交于 2019-12-12 01:57:20
问题 I want to create a dialog using Glade 3 (or gtk and Python). In Glade 2 if you wanted to create a dialog box there was an option to set a "standard button layout" which would automatically create an Ok button and a Cancel button which return either gtk.RESPONSE_OK or gtk.REPONSE_CANCEL. This feature has not been reimplmented in Glade 3. How can I create a dialog which will have ok and cancel buttons which return the correct response? Cheers, Pete 回答1: You can create them manually in Glade;

replace image using gtk.image.set_from_file

妖精的绣舞 提交于 2019-12-11 19:39:18
问题 I'm trying to add and if needed by user, change the image from a widget in python. I'm using Glade with gtk2+, python 2.7.3, and these is what I'm doing image = gtk.Image() image.set_from_file("MyImagePath.png") image.show() button = App.get_object('buttonExample') button.add(image) and this is what I get when try to change the image GtkWarning: Attempting to add a widget with type GtkImage to a GtkAspectFrame, but as a GtkBin subclass a GtkAspectFrame can only contain one widget at a time;

Do I have to manually attach a gtk signal handler when I specified the function name in glade?

让人想犯罪 __ 提交于 2019-12-11 18:31:22
问题 I'm writing my first gtk program, using gtkmm, and glade. I made a filechooserbutton and it has a signal called file-set So I set that to what I assume is the function name I want it to call when the file is chosen. But then I see here: http://library.gnome.org/devel/gtkmm-tutorial/unstable/sec-builder-accessing-widgets.html.en That they're manually getting the dialog widget and setting a button signal handler in the code. Which is the right way to do it? And while I'm here any links to good

How to properly close a dialog made in Glade?

自作多情 提交于 2019-12-11 15:05:38
问题 I use Glade to make GUI. I did a main window and a dialog. The dialog is called from a button placed in the main window. The problem is that when I close (delete-event) the dialog it is impossible to call it again with the same button click of the main window. I am able to hide the dialog with gtk_widget_hide_on_delete , but this option is not what I need. I need to close the dialog and free the memory it takes. So what is the proper way to destroy the dialog and call it again with the same

Why is the notebook control not showing up in my window?

こ雲淡風輕ζ 提交于 2019-12-11 07:32:18
问题 Although I am not new to Python, this is my first attempt at using Glade to design the interface. My Python file looks like this: import gobject import gtk import gtk.glade class prefs_dialog: def __init__ (self): # Initialize the dialog self.window = gtk.glade.XML("file.glade").get_widget("prefs_dialog") self.window.show() pd = prefs_dialog() gtk.main() And the "file.glade" file looks like this: <?xml version="1.0"?> <glade-interface> <!-- interface-requires gtk+ 2.16 --> <!-- interface