[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Newsgroup Home]
|
[news.eclipse.platform.swt] Re: restrict Composite size
|
A Table's preferred size (which is what pack() gives you) is to show all of
its items, so to keep it from doing this you have to set a size or size hint
on the Table or its parent. For example, if your Composite B uses a
GridLayout then you can give it width and height hints in its GridData, and
the Table will be sized to fit within it (and will show scrollbars if
needed).
Grant
"Rahul Yadav" <rahulyadav20@xxxxxxxxx> wrote in message
news:98d500bc346c39ef49c7200b185c8f08$1@xxxxxxxxxxxxxxxxxx
> HI All,
> Is there any way to limit the Composite size?? I have a Parent composite
> say "A", adding one more composite "B" to it....i add CheckBoxTableViewer
> "ctv" to it,elements in ctv are added at run time from a property file it
> has some 100 elements.The Problem is size of UI, due to large number of
> elemnts in ctv it is expanding to full length making Dialog to expand from
> top to bottom of screen and then adding scrollbar to it which is ok.
> Due to some limitations i can't use shell.setSize(), only way for me is to
> limit the size of composite "B" so that ctv does't expand beyond B's
> height.
>
>
>
>
>
>
>