Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » Update font size immediately
Update font size immediately [message #463319] Thu, 03 November 2005 13:08 Go to next message
Eclipse UserFriend
Originally posted by: murley.murley.murley

Hi,

My gui have a label using the font size specified by me, and i created a
FontDialog to let user change the font size.
After user click "Ok" button in FontDialog, the font didn't update
immediately (i.e. runtime change font size according to user selection)
Do anyone know how to perform ?

Thanks
Re: Update font size immediately [message #463322 is a reply to message #463319] Thu, 03 November 2005 15:13 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: friederich.kupzog.de

label.redraw(), composite.layout() or something like that?

Regards,
Friederich

murley wrote:
> Hi,
>
> My gui have a label using the font size specified by me, and i created a
> FontDialog to let user change the font size.
> After user click "Ok" button in FontDialog, the font didn't update
> immediately (i.e. runtime change font size according to user selection)
> Do anyone know how to perform ?
>
> Thanks
>
>


--
Friederich Kupzog
Elektronik & Software
Neusser Str. 5-7
50670 Köln
Tel 0241 160696-1
Fax 0221 726670
www.kupzog.de/fkmk
Re: Update font size immediately [message #463325 is a reply to message #463322] Thu, 03 November 2005 15:36 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: murley.murley.murley

thanks for reply,

Since my gui object is CTabItem, therefore no such method..

And if there has many objects (CTabItem) need to update, i don't want
manually update each one as it is not flexible
Re: Update font size immediately [message #463329 is a reply to message #463325] Thu, 03 November 2005 15:39 Go to previous messageGo to next message
Stefan Langer is currently offline Stefan LangerFriend
Messages: 236
Registered: July 2009
Senior Member
Updating the tabfolder the cTabitem belong to should do the trick.
Either layout or redraw on tabfolder

murley wrote:
> thanks for reply,
>
> Since my gui object is CTabItem, therefore no such method..
>
> And if there has many objects (CTabItem) need to update, i don't want
> manually update each one as it is not flexible
>
>
Re: Update font size immediately [message #463389 is a reply to message #463329] Fri, 04 November 2005 19:21 Go to previous message
Veronika Irvine is currently offline Veronika IrvineFriend
Messages: 1272
Registered: July 2009
Senior Member
Use CTabFolder.setFont() to change the font for all items or
CTabItem.setFont() to change the font for just one item.

DO NOT call redraw - this just causes a repaint and this is not neccessary -
the widget will repaint as required.

You may wish to call folder.getShell().layout(new Control[] {folder}) if you
want the CTabFolder to change size in order to accomodate the new font
size - however, this is not neccessary to see the font change and it really
depends on you application layout.

"Stefan Langer" <eclipse@bettsockentraeger.de> wrote in message
news:dkdat1$hh6$1@news.eclipse.org...
> Updating the tabfolder the cTabitem belong to should do the trick.
> Either layout or redraw on tabfolder
>
> murley wrote:
>> thanks for reply,
>>
>> Since my gui object is CTabItem, therefore no such method..
>>
>> And if there has many objects (CTabItem) need to update, i don't want
>> manually update each one as it is not flexible
Previous Topic:Using antialiasing in a cross-platform product
Next Topic:clipboard content not up to date
Goto Forum:
  


Current Time: Thu Apr 25 18:51:24 GMT 2024

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

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

Back to the top