Skip to main content
Filter by
Sorted by
Tagged with
2 votes
2 answers
524 views

I'm testing the GTK4 columnview list model for displaying multiple columns. Coding in C. I have that code working (see code below). I am running into trouble adding the standard columnview sort ...
dhugh's user avatar
  • 23
3 votes
1 answer
2k views

I'm making an application on gtk4 and I have a need to display a table with 5 columns. I realized that now the best widget for this would be columnview, I found a small working example but only for ...
Languedock's user avatar
6 votes
1 answer
2k views

I would like to add onclick event handling to a GtkBox widget. I see that only GtkButton has clicked signal, so I feel like the only option is to attach a GtkEventController to my widget. As per the ...
mltm's user avatar
  • 605
2 votes
3 answers
2k views

I'm trying to get what it's been typed in an entry and store it to afterwards use it elsewhere in my app, but I'm having a hard time trying to figure it out because functions like gtk_entry_get_text() ...
prxvvy's user avatar
  • 109
1 vote
2 answers
632 views

I have a GHashTable whose keys are strings. GList *keylist = g_hash_table_get_keys (my_hash); I want to populate a DropDown with the strings in keylist using a model. In Gtk > DropDown I see ...
9-Pin's user avatar
  • 482
0 votes
1 answer
1k views

I'm trying to setup a drop down button in my GTK application for my user to choose a day, i can create the widget, display it and connect a callback without any error, but the callback function is ...
Reapierre's user avatar
3 votes
1 answer
546 views

How can I get a GTK4 ColumnView to update the entire row when one cell in the row is changed? The following simple example creates a ColumnView with two columns for a String and the corresponding ...
Mint Julep's user avatar
2 votes
2 answers
381 views

I'm in the process of trying out the different layout managers of GTK4. I was able to successfully test GtkBinLayout, GtkBoxLayout, GtkCenterLayout and GtkContstraintLayout (see script). However, I ...
Holger's user avatar
  • 1,200
2 votes
1 answer
552 views

I am working on one small project in C using GTK4 and Miniaudio. I need to pass some arguments through g_signal_connect() to several widgets. Since I am new to GTK, I tried to experiment on a basic ...
heroes-of-balkan's user avatar
1 vote
1 answer
3k views

I'm trying to handle a key press event using gtk 4 in c (arrow keys to be specific). Whenever I use some answers from places like here (stackoverflow) and here (stackoverflow) they seem not to work. ...
Yeezus's user avatar
  • 402
1 vote
1 answer
117 views

I need to get the GtkWindow or toplevel widget from my G_DEFINE_TYPE: MyAppWindow.c: #include "MyAppWindow.h" struct _MyAppWindow { GtkApplicationWindow parent; }; G_DEFINE_TYPE (...
Joel's user avatar
  • 2,043
1 vote
2 answers
680 views

I'm developing a C++ GTK application and I'm trying to implement a dark mode theme using CSS. I've created a style.css file with the necessary styles, but I'm having trouble applying these styles to ...
koren69's user avatar
  • 21
1 vote
3 answers
178 views

I'm trying to create a Volume (Cairo circle) button in gtk4. which can be rotate by mouse motion event. By clicking anywhere on the button and rotating it, the value 1-100 will be output. Tried a lot, ...
dibyendu's user avatar
  • 452
1 vote
1 answer
167 views

I am facing issue to set background color of selected text in GtkText widget. I tried this way, but it didn't work! can anybody check it ? -- static const char *css = ".one text.selection {" ...
dibyendu's user avatar
  • 452
0 votes
1 answer
905 views

I am trying to create a context menu, which will show in the Gtk4 window on mouse right click. In case of Gtk3 i used gtk_menu_popup_at_pointer(GTK_MENU(popup), event) function to show context menu, ...
dibyendu's user avatar
  • 452
0 votes
1 answer
786 views

I'm trying to pass the address of a struct to the gpointer data argument of g_signal_connect such that the callback function can print the int members of the struct when a button is clicked. I'm new ...
Troglobyte's user avatar
0 votes
1 answer
422 views

Here is an extract of GTK3 code. I would like the translation with GTK4. GtkWidget *menu, *item1, *item2, *item3; menu = gtk_menu_new(); item1 = gtk_menu_item_new_with_label("Item 1");...
René Rigault's user avatar
0 votes
2 answers
441 views

I am trying to add colors to the 2 buttons in gtk4 GUI written in c language. From the docs, I have found functions to load and set the css class name for 2 buttons. But for some reason the styles are ...
Li En's user avatar
  • 17
0 votes
1 answer
137 views

When this example program #include <gtk/gtk.h> static void draw_func( GtkDrawingArea* drawing_area, cairo_t *cr, #ifdef GTK3 #else int width, int height, #endif gpointer user_data ) { ...
Donald's user avatar
  • 19