Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.gui > #5387

Re: Scroll bar issue...

Newsgroups comp.lang.java.gui
Date 2013-11-21 09:24 -0800
References <75e31d97-900b-4523-b866-849f5b4bdecd@googlegroups.com>
Message-ID <8e22c0f4-b246-4dd5-bc88-ca5bd84ffab6@googlegroups.com> (permalink)
Subject Re: Scroll bar issue...
From FredK <fred.l.kleinschmidt@gmail.com>

Show all headers | View raw


On Thursday, November 21, 2013 1:15:45 AM UTC-8, saranya....@gmail.com wrote:
> I am new to SWT...struggling to make the content to scroll,i got the scroll bar but i couldn't scroll the content in that particular tabfolder... protected void setControls(Composite parent) { final ScrolledComposite sc2 = new ScrolledComposite(parent, SWT.H_SCROLL | SWT.V_SCROLL | SWT.BORDER); sc2.setExpandHorizontal(true); sc2.setExpandVertical(true); final Composite c2 = new Composite(sc2, SWT.NONE); sc2.setContent(c2); GridLayout layout = new GridLayout(); layout.numColumns = 2; c2.setLayout(layout); sc2.setMinSize(c2.computeSize(SWT.DEFAULT, SWT.DEFAULT)); OptionGroup = new Group(this, SWT.SCROLL_LINE); OptionGroup.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 2, 1)); OptionGroup.setLayout(new GridLayout()); final GridLayout gl_fileOptionGroup1 = new GridLayout(); gl_fileOptionGroup1.numColumns = 2; OptionGroup.setLayout(gl_fileOptionGroup1); Label label = new Label(OptionGroup, SWT.NULL); label.setText("Directory:"); label.setToolTipText("The directory to write files to"); label.setLayoutData(new GridData()); directoryText = new StyledText(OptionGroup, SWT.BORDER | SWT.SINGLE); directoryText.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false)); directoryText.addModifyListener(modifyListener); try { directoryNameProposal = new ParameterProposals(directoryText); } catch (Exception e1) { }....... Like this i have mang groups....where i am going wrong...any help on this would be great.... Thanks.

You create the component c2 controlled by the ScrolledComposite, but I don't see anywhere that you place anything in c2.
-- 
Fred K

Back to comp.lang.java.gui | Previous | NextPrevious in thread | Find similar


Thread

Scroll bar issue... saranya.harigopal@gmail.com - 2013-11-21 01:15 -0800
  Re: Scroll bar issue... FredK <fred.l.kleinschmidt@gmail.com> - 2013-11-21 09:24 -0800

csiph-web