[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Newsgroup Home]
[news.eclipse.platform.swt] composite layout() and pack() problem

Hello,

I run into some layout() and pack() problem. I try to create a popup shell, and on that shell, I put a ScrolledComposite, and add a Composite on that ScrolledComposite. I set the layout to be GridLayout and layout data to be GridData.

Later, I need add either a TreeViewer or some other widget on this Composite accordingly. My problem is, after I added a TreeViewer on this Composite, when the Shell is opened, the TreeViewer is not visible. I tried to call layout() or layout(true, true) on the composite, but this doesn’t work. Only if I call composite.pack(), the TreeViewer becomes visible, but it minimize the size of my TreeViewer with scroll bars around it. I also tried to change the layout to be FillLayout for the composite, but same results.

Add idea what I do wrong. I appreciate any help.

Thanks,
Hongying Zhang