Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » How to prevent a widget to gain focus...
How to prevent a widget to gain focus... [message #448056] Wed, 29 December 2004 21:37 Go to next message
jmi is currently offline jmiFriend
Messages: 84
Registered: July 2009
Member
Hi,

I would like to set a widget unfocusable when it is setEditable(false). In
fact, i want to simulate a setEnabled(false)... without the text gray color
wich is unreadable ;-))) I could force the focus to another widget in the
focusGained...

Another suggestion?

Thanks

JMi
Re: How to prevent a widget to gain focus... [message #448061 is a reply to message #448056] Thu, 30 December 2004 00:06 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">I think your best bet is the solution you proposed:
forcing the focus to another widget.&nbsp; There will obviously be a time
lag on slower machines or when the processor is bogged down, but...<br>
<br>
Daniel<br>
</font><br>
JM Delsaux wrote:
<blockquote cite="midcqv82p$v1p$1@www.eclipse.org" type="cite">
<pre wrap="">Hi,

I would like to set a widget unfocusable when it is setEditable(false). In
fact, i want to simulate a setEnabled(false)... without the text gray color
wich is unreadable ;-))) I could force the focus to another widget in the
focusGained...

Another suggestion?

Thanks

JMi


</pre>
</blockquote>
</body>
</html>
Re: How to prevent a widget to gain focus... [message #448417 is a reply to message #448056] Sun, 09 January 2005 14:06 Go to previous messageGo to next message
Max is currently offline MaxFriend
Messages: 28
Registered: July 2009
Junior Member
In article <cqv82p$v1p$1@www.eclipse.org>, JMDelsaux@skynet.be says...
> I would like to set a widget unfocusable when it is setEditable(false). In
> fact, i want to simulate a setEnabled(false)... without the text gray color
> wich is unreadable ;-))) I could force the focus to another widget in the
> focusGained...

Why not get the color of the enabled widget and set that color after you
disable it?
--
Regards Max rotvel AT bolignet-aarhus DOT dk
Re: How to prevent a widget to gain focus... [message #448487 is a reply to message #448417] Tue, 11 January 2005 08:23 Go to previous message
jmi is currently offline jmiFriend
Messages: 84
Registered: July 2009
Member
Max wrote:

> In article <cqv82p$v1p$1@www.eclipse.org>, JMDelsaux@skynet.be says...
>> I would like to set a widget unfocusable when it is setEditable(false). In
>> fact, i want to simulate a setEnabled(false)... without the text gray color
>> wich is unreadable ;-))) I could force the focus to another widget in the
>> focusGained...

> Why not get the color of the enabled widget and set that color after you
> disable it?

It is already done... ;-)) but i want to have unfocusable composite at a
certain time. The composite has to be "easily readable".
Previous Topic:Combo in a Toolbar
Next Topic:PDF Viewer plugin AWT/SWT problem
Goto Forum:
  


Current Time: Thu Apr 25 04:58:47 GMT 2024

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

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

Back to the top