Skip to main content



      Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » Multi Line Labels/Text Fields
Multi Line Labels/Text Fields [message #370988] Mon, 16 June 2003 05:47 Go to next message
Eclipse UserFriend
Originally posted by: meghani.strandgenomics.com

Hi,

How can I create multi line labels that can contain more than one line of
displayed text and automatically wrapped onto a different line if it is not
fitting within the availabel area?
Also, how can I do the same for text areas

regards
Shripal
Re: Multi Line Labels/Text Fields [message #371004 is a reply to message #370988] Mon, 16 June 2003 10:19 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: veronika_irvine.oti.com

Wrapping - create Lable/Text with style SWT.WRAP

Multiple Lines - create Text with style SWT.MULTI. Label does not support
multiple lines.

"Shripal Meghani" <meghani@strandgenomics.com> wrote in message
news:bck3no$p0h$1@rogue.oti.com...
> Hi,
>
> How can I create multi line labels that can contain more than one line of
> displayed text and automatically wrapped onto a different line if it is
not
> fitting within the availabel area?
> Also, how can I do the same for text areas
>
> regards
> Shripal
>
>
Re: Multi Line Labels/Text Fields [message #371010 is a reply to message #371004] Mon, 16 June 2003 13:17 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: steve_northover.ca.ibm.com

.... actually, labels do support multiple lines. If the text has multiple
lines, they will be displayed.

"Veronika Irvine" <veronika_irvine@oti.com> wrote in message
news:bckjl5$7gv$1@rogue.oti.com...
> Wrapping - create Lable/Text with style SWT.WRAP
>
> Multiple Lines - create Text with style SWT.MULTI. Label does not support
> multiple lines.
>
> "Shripal Meghani" <meghani@strandgenomics.com> wrote in message
> news:bck3no$p0h$1@rogue.oti.com...
> > Hi,
> >
> > How can I create multi line labels that can contain more than one line
of
> > displayed text and automatically wrapped onto a different line if it is
> not
> > fitting within the availabel area?
> > Also, how can I do the same for text areas
> >
> > regards
> > Shripal
> >
> >
>
>
Re: Multi Line Labels/Text Fields [message #371022 is a reply to message #371010] Tue, 17 June 2003 01:05 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: meghani.strandgenomics.com

Do various layouts mess around with these things? Becuase I have tried both
of these options before posting my earlier query...
and I did not get a proper result....

Also, Is there some way of displaying multiple lines inside a TableViewer
(say by fooling around with the CellRenderers??)

"Steve Northover" <steve_northover@ca.ibm.com> wrote in message
news:bcku3f$hqi$1@rogue.oti.com...
> ... actually, labels do support multiple lines. If the text has multiple
> lines, they will be displayed.
>
> "Veronika Irvine" <veronika_irvine@oti.com> wrote in message
> news:bckjl5$7gv$1@rogue.oti.com...
> > Wrapping - create Lable/Text with style SWT.WRAP
> >
> > Multiple Lines - create Text with style SWT.MULTI. Label does not
support
> > multiple lines.
> >
> > "Shripal Meghani" <meghani@strandgenomics.com> wrote in message
> > news:bck3no$p0h$1@rogue.oti.com...
> > > Hi,
> > >
> > > How can I create multi line labels that can contain more than one line
> of
> > > displayed text and automatically wrapped onto a different line if it
is
> > not
> > > fitting within the availabel area?
> > > Also, how can I do the same for text areas
> > >
> > > regards
> > > Shripal
> > >
> > >
> >
> >
>
>
Re: Multi Line Labels/Text Fields [message #371043 is a reply to message #371022] Tue, 17 June 2003 09:39 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: steve_northover.ca.ibm.com

Layouts don't play with lines.
I don't know what a CellRenerer is <g> - try eclipse.platform.

"Shripal Meghani" <meghani@strandgenomics.com> wrote in message
news:bcm7i6$gno$1@rogue.oti.com...
> Do various layouts mess around with these things? Becuase I have tried
both
> of these options before posting my earlier query...
> and I did not get a proper result....
>
> Also, Is there some way of displaying multiple lines inside a TableViewer
> (say by fooling around with the CellRenderers??)
>
> "Steve Northover" <steve_northover@ca.ibm.com> wrote in message
> news:bcku3f$hqi$1@rogue.oti.com...
> > ... actually, labels do support multiple lines. If the text has
multiple
> > lines, they will be displayed.
> >
> > "Veronika Irvine" <veronika_irvine@oti.com> wrote in message
> > news:bckjl5$7gv$1@rogue.oti.com...
> > > Wrapping - create Lable/Text with style SWT.WRAP
> > >
> > > Multiple Lines - create Text with style SWT.MULTI. Label does not
> support
> > > multiple lines.
> > >
> > > "Shripal Meghani" <meghani@strandgenomics.com> wrote in message
> > > news:bck3no$p0h$1@rogue.oti.com...
> > > > Hi,
> > > >
> > > > How can I create multi line labels that can contain more than one
line
> > of
> > > > displayed text and automatically wrapped onto a different line if it
> is
> > > not
> > > > fitting within the availabel area?
> > > > Also, how can I do the same for text areas
> > > >
> > > > regards
> > > > Shripal
> > > >
> > > >
> > >
> > >
> >
> >
>
>
Re: Multi Line Labels/Text Fields [message #371049 is a reply to message #371022] Tue, 17 June 2003 10:07 Go to previous message
Eclipse UserFriend
Originally posted by: veronika_irvine.oti.com

If you use a GridLayout and do not specify any GridData, then the Text
widget will be given its preferred width which will be big enough to show
the whole line without wrapping. If the Text widget has no text, the
default size is one line high and a width of 64. If you want the Text
widget to wrap than you should set the GridData.widthHint for the Text
widget (same is true for Label). For the Text widget, you should also
specify a vertical scrollbar so that the user can enter more lines of text
than are visible (otherwise, you will just get a beep when you hit return in
the last visible line).

Text t = new Text(shell, SWT.MULTI | SWT.WRAP | SWT.V_SCROLL);
GridData data = new GridData();
data.widthHint = 300;
data.heightHint = 100;
t.setLayoutData(data);

As far as multiple line text editors in a Tree or Table see bug 19496 - text
wrap in table cells.

"Shripal Meghani" <meghani@strandgenomics.com> wrote in message
news:bcm7i6$gno$1@rogue.oti.com...
> Do various layouts mess around with these things? Becuase I have tried
both
> of these options before posting my earlier query...
> and I did not get a proper result....
>
> Also, Is there some way of displaying multiple lines inside a TableViewer
> (say by fooling around with the CellRenderers??)
>
Previous Topic:Calculating/Getting the number of visible rows in a Table
Next Topic:Modality problem in gtk
Goto Forum:
  


Current Time: Thu Nov 06 15:13:39 EST 2025

Powered by FUDForum. Page generated in 0.04224 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top