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 165227 - ComboBox's popup items wrongly positioned
ComboBox's popup items wrongly positioned
Status: RESOLVED DUPLICATE of bug 129463
Product: libglademm
Classification: Other
Component: general
git master
Other All
: Normal normal
: ---
Assigned To: gtkmm-forge
gtkmm-forge
Depends on:
Blocks:
 
 
Reported: 2005-01-25 20:18 UTC by Ney André de Mello Zunino
Modified: 2011-01-16 23:33 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Ney André de Mello Zunino 2005-01-25 20:18:25 UTC
Please describe the problem:
When activating a combo box whose items are too numerous to fit the space left
below it (down until the bottom of the desktop), the items are wrongly
positioned on the popup menu. It is as if the popup menu shown has the correct
dimensions, but the items are not rendered beginning from the top of it, causing
an empty area to appear on the top and the little arrow to allow scrolling the
items at the bottom.

Steps to reproduce:
1. Add a ComboBox widget to a window.
2. Enter a considerable number of items for it; 20, say.
3. In your application, use libglademm to load the widget.
4. Upon runtime, try activating the combo box with its parent window positioned
at different heights with relation to the desktop.


Actual results:
Depending on the position of the combo box widget with regards to the desktop,
its items will appear vertically displaced when the combo box is activated.

Expected results:
The combo box's items should occupy the whole area of the popup menu and
scrolling arrows should be displayed only if necessary, that is, if the total
number of items were so large that they would not fit in an area as large as the
desktop's height.

Does this happen every time?
Yes.

Other information:
I have taken 2 screenshots of my application where the problem is depicted:

  1) The dialog box containing the combo box widget
     http://zunino.eti.br/tests/gtkmm/comboboxtext/comboboxtext-1.png
  2) The combo box having been activated; notice the blank area at the top.
     http://zunino.eti.br/tests/gtkmm/comboboxtext/comboboxtext-2.png

Note: There is actually another issue, which is that the items entered in Glade
are being duplicated (two per line), but I won't mix things up. In any case, I
would appreciate if someone knew the reason and dropped me a line.
Comment 1 Murray Cumming 2005-01-26 14:04:43 UTC
Can you reproduce this with a C application?

> Note: There is actually another issue, which is that the items entered in Glade
> are being duplicated (two per line)

So, please put that in another gnomemm (libglademm component) bug.
Comment 2 Vincent Noel 2005-01-26 19:28:11 UTC
This is on purpose, and is discussed in bug #129463.
For the record, I agree with you : it looks weird :)

*** This bug has been marked as a duplicate of 129463 ***
Comment 3 Ney André de Mello Zunino 2005-01-27 12:10:28 UTC
Murray Cumming wrote on comment #1:

> So, please put that in another gnomemm (libglademm component) bug.

I was about to do so, but then I found a solution (or a workaround, at least): I
used the Gtk::ComboBox::set_wrap_width() member with an argument of 1, which
caused the items to be displayed as desired: only 1 per row. This had two
noticeable side-effects: 1) the width of the popup menu shrank to become only
wide enough to hold the widest item; and 2) the empty-area-on-the-top issue was
no longer there.

Now, I am not sure these side-effects are supposed to have taken place as a
consequence of using set_wrap_width(), but I thought I would mention them here
for documentation purposes.

Regards.