Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » Change Label style dynamically ?
Change Label style dynamically ? [message #450881] Sat, 19 February 2005 10:27 Go to next message
Arnaud is currently offline ArnaudFriend
Messages: 60
Registered: July 2009
Member
Hi !

Is it possible to change a Label (or CLabel) style dynamically ? I mean
that you start with a SHADOW_IN style and change to SHADOW_OUT according
to a specific user action for example.

TIA

--
Arnaud
Re: Change Label style dynamically ? [message #450886 is a reply to message #450881] Sat, 19 February 2005 18:31 Go to previous messageGo to next message
Daniel Spiewak is currently offline Daniel SpiewakFriend
Messages: 263
Registered: July 2009
Senior Member
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
<title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
<font face="serif">No, this isn't supported in SWT.&nbsp; Your best bet is
to create a custom composite which aggregates to two instances of Label
(or CLabel) which are switched between internally using StackLayout.&nbsp;
This is how I solved the problem of switching between SWT.INDETERMINATE
and SWT.NONE ProgressBar styles.<br>
<br>
Daniel<br>
</font><br>
Arnaud wrote:
<blockquote cite="midcv74b8$mgf$1@www.eclipse.org" type="cite">Hi !
<br>
<br>
Is it possible to change a Label (or CLabel) style dynamically ? I mean
that you start with a SHADOW_IN style and change to SHADOW_OUT
according to a specific user action for example.
<br>
<br>
TIA
<br>
<br>
--
<br>
Arnaud
<br>
</blockquote>
</body>
</html>
Re: Change Label style dynamically ? [message #450887 is a reply to message #450886] Sat, 19 February 2005 20:28 Go to previous messageGo to next message
Arnaud is currently offline ArnaudFriend
Messages: 60
Registered: July 2009
Member
I indeed thought to something like (it's a bit different cause I use GEF
and have a model class which wrapps a SWT.Label, so I can simply wrap
two instances and switch between them without creating a new custom
control).

Thanks for answer.

--
Arnaud


Daniel Spiewak a écrit :
> No, this isn't supported in SWT. Your best bet is to create a custom
> composite which aggregates to two instances of Label (or CLabel) which
> are switched between internally using StackLayout. This is how I solved
> the problem of switching between SWT.INDETERMINATE and SWT.NONE
> ProgressBar styles.
>
> Daniel
>
> Arnaud wrote:
>
>> Hi !
>>
>> Is it possible to change a Label (or CLabel) style dynamically ? I
>> mean that you start with a SHADOW_IN style and change to SHADOW_OUT
>> according to a specific user action for example.
>>
>> TIA
>>
>> --
>> Arnaud
>
Re: Change Label style dynamically ? [message #451020 is a reply to message #450881] Mon, 21 February 2005 17:02 Go to previous message
Steve Northover is currently offline Steve NorthoverFriend
Messages: 1636
Registered: July 2009
Senior Member
Dispose and create a new one?

"Arnaud" <no@mail.please> wrote in message
news:cv74b8$mgf$1@www.eclipse.org...
> Hi !
>
> Is it possible to change a Label (or CLabel) style dynamically ? I mean
> that you start with a SHADOW_IN style and change to SHADOW_OUT according
> to a specific user action for example.
>
> TIA
>
> --
> Arnaud
Previous Topic:Shell Control Drag-Move
Next Topic:Question about ImageLoader or Java in general...
Goto Forum:
  


Current Time: Fri Apr 26 23:49:43 GMT 2024

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

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

Back to the top