[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Newsgroup Home]
[news.eclipse.platform.swt] Re: Dialogs

Hi Tom,

There isn't a way to make this just happen.  The best you can do is to
measure the string as if it was to be displayed within the Shell (example:
http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet93.java?view=co )
, add some width to account for the shell decorations, and set the content
to be at least this wide.  The two potential problems with this approach are
the estimating of the shell decoration widths, and the assumption that the
title font is similar to the content font.  I don't have a better suggestion
to offer though.

Grant


"Tom Kratzke" <kratzke@xxxxxxxxxx> wrote in message
news:074d1224a0149f55d151d3c18f815bd3$1@xxxxxxxxxxxxxxxxxx
> Is there a way to set a dialog's width to guarantee that its title will be
> fully displayed?  If I have a long name, the title gets truncated, and I'm
> trying to avoid that.
>