[Gtk-sharp-list] Combo box drop down width
david.anes at gmail.com
Wed Mar 21 19:00:42 EDT 2007
Well, you can ellipsize the string using pixels (I think) using Pango
layouts, but I am not sure how to do this. I think you can limit the size of
the string in pixels and it will auto-ellipsize if needed.
You can always measure the string in pixels, also, and make your own
routine, based in the current allocation of the cbox.
2007/3/21, James Fitzsimons <james.fitzsimons at gmail.com>:
> Hi David,
> Thanks for your reply. The reason I wanted to avoid going for a solution
> like limiting the number of characters is because the combos resize as
> you resize the application window. I was hoping for a nice solution that
> would allow the drop down to take as much space as there was available
> but no more.
> Is it not possible to limit the width of the drop down list to the width
> of the combo box?
> On Wed, 2007-03-21 at 11:13 +0100, David Anes wrote:
> > Hi James.
> > Why not limiting the number of characters or using ellipsis when
> > rendering with the text renderer?
> > Regards,
> > David Anes.
> > 2007/3/20, James Fitzsimons <james.fitzsimons at gmail.com>:
> > Hi all,
> > I'm new to GTK programming and GTK#. I have a couple of combo
> > boxes
> > which contain two columns, a CellRendererPixbuf and a
> > CellRendererText.
> > If any of the strings in the text column are very long (which
> > is only
> > known at runtime), the width of the drop down can grow beyond
> > the size
> > of the screen.
> > I would like to know if there is a way of limiting the width
> > of the drop
> > down list to be the same width as the combo box?
> > Thanks for any help you can provide!
> > James
> > _______________________________________________
> > Gtk-sharp-list maillist - Gtk-sharp-list at lists.ximian.com
> > http://lists.ximian.com/mailman/listinfo/gtk-sharp-list
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Gtk-sharp-list