c++ - Gtkmm - "Gtk::DrawingArea" in "Gtk::ScrolledWindow"? -


I am creating a GUI program using "gtkmm". I want to draw some graphics on the "Gtk :: DrawingArea" widget, but I want the widget to be "resizable", so when I say a line of "(0, 0)" to "(50, 50) Am "pixel - drawing area should be changed to the size of a square of size" (50, 50) "; And when I draw a line from "(0, 0)" for example, then to say "(100, 70)" pixel-drawing area should be "(100, 70)" in the size of the rectangle.

And to do this - I put the "Gtk :: DrawingArea" widget in the "GTK :: Scroll Wide" container.

So when I put a picture with size "(100, 100)" For drawing area -> I will call the appropriate member function "Gtk :: DrawingArea :: Set ___ size_screw (100, 100) ) ", Which will set the drawing area size to (100, 100) pixels, then" Gtk :: ScrolledWindow "is" smaller "than" Gtk :: DrawingArea ", then the scroll window should be" scrolled "to - But the problem is that it does not work !!!!!

So can someone explain to me how can I do this?

Thank you.

Add a GTK :: viewport between your scrolled window and drawing area.


Comments

Popular posts from this blog

asp.net - Javascript/DOM Why is does my form not support submit()? -

sockets - Delphi: TTcpServer, connection reset when reading -

javascript - Classic ASP "ExecuteGlobal" statement acting differently on two servers -