[Gtk-sharp-list] ComboBox display problem

Rafael Teixeira monoman at gmail.com
Fri Jul 1 09:05:15 EDT 2005


I  think that is a problem with ComboBox itself (up to GTK 2.4 at
least) as with any program gnome program that I use that has such
widget it behaves in this bizarre way.

Not sure if they corrected it in GTK 2.6...

:|

On 6/30/05, Bryan Buchanan <adslh3nu at tpg.com.au> wrote:
> Hi,
> 
> When the number of items in a ComboBox needs to scroll, there can
> sometimes be blank space displayed in the popup menu. The code below
> demonstrates it. Start the prog, move the window to near the bottom of
> the screen and click the combo. Blank space will display in the pop-up
> menu and the items in the popup scroll into the blank space.
> 
> Is there a way to stop this ?
> 
> Thanks,
> 
> Bryan
> 
> // mcs test.cs -r:System.Data -pkg:gtk-sharp-2.0
> using System;
> public class Test {
>   public static void Main (string [] args) {
>     new Test(args);
>   }
>   public Test(string [] args) {
>    Gtk.Application.Init ();
> 
>    Gtk.Window win = new Gtk.Window(Gtk.WindowType.Toplevel);
>    win.DeleteEvent += new Gtk.DeleteEventHandler (DeleteEventCb);
>    win.Title = "Test";
> 
>    Gtk.ComboBox combo = new Gtk.ComboBox();
>    Gtk.ListStore model = new Gtk.ListStore (typeof(string), t
> ypeof(int));
>    Gtk.CellRendererText renderer = new Gtk.CellRendererText ();
>    combo.Model = model;
>    combo.PackStart(renderer, true);
>    combo.AddAttribute(renderer, "text", 0);
>    combo.ColumnSpanColumn = 1;
>    combo.RowSpanColumn = 1;
> 
>    // fill in the liststore
>    for(int i=0; i<30; i++) {
>      model.AppendValues("description " + i, 1);
>    }
> 
>    win.Add (combo);
>    win.ShowAll ();
> 
>    Gtk.Application.Run ();
>  }
>  void DeleteEventCb (object o, Gtk.DeleteEventArgs args) {
>    Gtk.Application.Quit ();
>    args.RetVal = true;
>  }
> }
> 
> 
> _______________________________________________
> Gtk-sharp-list maillist  -  Gtk-sharp-list at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/gtk-sharp-list
> 


-- 
Rafael "Monoman" Teixeira
---------------------------------------
I'm trying to become a "Rosh Gadol" before my own eyes. 
See http://www.joelonsoftware.com/items/2004/12/06.html for enlightment.
It hurts!


More information about the Gtk-sharp-list mailing list