Custom widget (GtkCheckButton) in column header of GtkTreeView

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Custom widget (GtkCheckButton) in column header of GtkTreeView

Rob Groen
Holle,

I've been struggling with using a custom widget, in my case a GtkCheckButton, in de GtkTreeViewColumn. I noticed the following, note that I had the column set to Clickable:
1) After using Set_Widget, an explicit Show_All on the check button is required to make it visible in the tree view column header. It doesn't become visible when doing a Show_All on the containing window.

2) In order to be able to activate the check button in the header, a call to Show_All on the window must be done >before< calling Set_Widget on the tree view column, no matter the clickability of the column or of the tree view header. If these calls are done in a different order there is no obvious way to be able to activate the check button in the column header.
It has taken me quite some time to get it working and then only by accident.

Does any know why this is so, especially for 2). I couldn't find anything in documentation or comments in code that says why (but that could be due to my bad searching).

As for check buttons, why is the inconsistency state only visible when the button is not active. If it is active and inconsistency is set to true, there is no change in the way the button looks.

Regards
Rob Groen


_______________________________________________
gtkada mailing list
[hidden email]
https://lists.adacore.com/mailman/listinfo/gtkada