1
votes

I program my application in C using GTK+3 and cairo.

is there a way to draw a line on top of a Vertical GtkBox ?

the thing is that I need to mark an area with a line. the area is a row of a vertical GtkBox, which is not a GtkDrawingArea.

is that possible?

any information regarding the issue would be greatly appreciated.

1
Anything tried yet? How about subclassing GtkBox, overwriting the default draw handler (no signal connect foo, that can't work as it is executed before the default draw handler if I remember correctly, recheck that) and within that call your the default GtkBox draw handler and afterwards draw the line before exiting the your_draw_handler function? Just a thought. Also, code? Note that I did not try this, I can only tell you what I stumbled upon when implementing custom widgets, not hacking existing ones.drahnr
hi! i didn't try anything yet. didn't have ideas where to start. you provided some good points. i'll check them out. thanksufk

1 Answers

0
votes

I'm using glade in order to create the Gtk Vertical Box.

I connected a callback to the draw signal and I marked 'After' in glade which actually calls my callback after the basic drawing. which allows me to draw on top of the elements inside it.

as simple as that ;)