Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » Resizing labels in SWT
Resizing labels in SWT [message #441385] Fri, 13 August 2004 14:56 Go to next message
Eclipse UserFriend
Originally posted by: tim.seed.lvs.co.uk

I'm trying to write my own tooltip stuff. I'm using a label to display the
tip. Can anyone tell me how to force a label to resize itself? I set the
text and it goes off the end of the label. It is very frustrating!

Thanks for any help.
Re: Resizing labels in SWT [message #441390 is a reply to message #441385] Fri, 13 August 2004 15:08 Go to previous messageGo to next message
Carolyn MacLeod is currently offline Carolyn MacLeodFriend
Messages: 149
Registered: July 2009
Senior Member
Try
label.pack();
?
Or maybe just pack your Shell (I assume you have a borderless Shell holding
the Label to emulate the tooltip?)
Carolyn

"Tim Seed" <tim.seed@lvs.co.uk> wrote in message
news:cfikqo$ki9$1@eclipse.org...
> I'm trying to write my own tooltip stuff. I'm using a label to display the
> tip. Can anyone tell me how to force a label to resize itself? I set the
> text and it goes off the end of the label. It is very frustrating!
>
> Thanks for any help.
>
Re: Resizing labels in SWT [message #441393 is a reply to message #441390] Fri, 13 August 2004 15:11 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: tim.seed.lvs.co.uk

It works! Thank you so much Carolyn, you have no idea how long I have been
trying to get this to work!

Carolyn MacLeod wrote:

> Try
> label.pack();
> ?
> Or maybe just pack your Shell (I assume you have a borderless Shell holding
> the Label to emulate the tooltip?)
> Carolyn

> "Tim Seed" <tim.seed@lvs.co.uk> wrote in message
> news:cfikqo$ki9$1@eclipse.org...
> > I'm trying to write my own tooltip stuff. I'm using a label to display the
> > tip. Can anyone tell me how to force a label to resize itself? I set the
> > text and it goes off the end of the label. It is very frustrating!
> >
> > Thanks for any help.
> >
Re: Resizing labels in SWT [message #441396 is a reply to message #441393] Fri, 13 August 2004 15:27 Go to previous message
Carolyn MacLeod is currently offline Carolyn MacLeodFriend
Messages: 149
Registered: July 2009
Senior Member
You're welcome.
pack() just sets the size of a widget to its preferred size.
I didn't know if you had a layout in there or what exactly your code was
like, but I was hoping pack() would work.
I assume it works best when you pack the Shell? That should should pack the
Label and the Shell.
Carolyn

"Tim Seed" <tim.seed@lvs.co.uk> wrote in message
news:cfilnk$m8f$1@eclipse.org...
> It works! Thank you so much Carolyn, you have no idea how long I have been
> trying to get this to work!
>
> Carolyn MacLeod wrote:
>
> > Try
> > label.pack();
> > ?
> > Or maybe just pack your Shell (I assume you have a borderless Shell
holding
> > the Label to emulate the tooltip?)
> > Carolyn
>
> > "Tim Seed" <tim.seed@lvs.co.uk> wrote in message
> > news:cfikqo$ki9$1@eclipse.org...
> > > I'm trying to write my own tooltip stuff. I'm using a label to display
the
> > > tip. Can anyone tell me how to force a label to resize itself? I set
the
> > > text and it goes off the end of the label. It is very frustrating!
> > >
> > > Thanks for any help.
> > >
>
>
Previous Topic:Possible bug: view with a browser
Next Topic:Why doesn't my ToolBar show up
Goto Forum:
  


Current Time: Tue Apr 23 10:48:41 GMT 2024

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

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

Back to the top