After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 118498 - ScrolledWindow doesn't scroll DrawingArea
ScrolledWindow doesn't scroll DrawingArea
Status: RESOLVED NOTABUG
Product: gtkmm
Classification: Bindings
Component: general
2.0
Other Linux
: Normal normal
: ---
Assigned To: gtkmm-forge
gtkmm-forge
Depends on:
Blocks:
 
 
Reported: 2003-07-28 17:36 UTC by Nik A. Melchior
Modified: 2004-12-22 21:47 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
test case: broken ScrolledWindow containing DrawingArea (1.82 KB, text/plain)
2003-07-28 17:37 UTC, Nik A. Melchior
Details
The C (gtk+) version, which *does* scroll. (2.39 KB, text/plain)
2003-07-29 17:10 UTC, Nik A. Melchior
Details

Description Nik A. Melchior 2003-07-28 17:36:29 UTC
I hope I'm just missing an event handler, but I have not been able to
create a ScrolledWindow that allows scrolling.  I'm trying to create a
ScrolledWindow that is initially centered on a DrawingArea of unknown size
(i.e. may be larger or smaller than the ScrolledWindow).  However, the
scrollbars won't allow me to scroll, despite the fact that the accessors
for the associated Adjustments seem to indicate that their entire range is
not currently visible within one page size.

If I set the ScrolledWindow policy to POLICY_AUTOMATIC, the scrollbars
do not appear, but the entire Pixbuf is clearly not visible at once.

I am attaching a simple test case that displays my problem.  As stated, I
believe that I could simply be missing an event handler, but this code is
directly converted from gtk+ C code that does work (I can submit that upon
request).

A ScrolledWindow example in the documentation might help me fix this problem ;)
Comment 1 Nik A. Melchior 2003-07-28 17:37:52 UTC
Created attachment 18687 [details]
test case: broken ScrolledWindow containing DrawingArea
Comment 2 Murray Cumming 2003-07-29 06:07:51 UTC
> but this code is directly converted from gtk+ C code that does work
(I > can submit that upon request)

Yes, please. That is often very helpful.
Comment 3 Nik A. Melchior 2003-07-29 17:10:50 UTC
Created attachment 18724 [details]
The C (gtk+) version, which *does* scroll.
Comment 4 Murray Cumming 2003-08-01 07:51:12 UTC
After reducing the examples some more (which you really could have
done yourself), I find that the C++ version has no equivalent for the
gtk_drawing_area_size() call. gtk_drawing_area_size() is deprecated:
http://developer.gnome.org/doc/API/2.0/gtk/GtkDrawingArea.html#gtk-drawing-area-size

So you should probably call set_size_request() on the DrawingArea. I
would try it but I have just killed my hard drive.