Focus on a Text in a Dialog [message #897753] |
Wed, 25 July 2012 08:23 |
|
Hi guys,
I am trying to set the focus of my custom Dialog and I am not able to do it. I have try it in different ways, but I've never found the way to do it.
The last thing I tried is add a ControlListener to my shell in order to perform a setFocus when the Dialog is resized as this:
shell.addControlListener(new ControlAdapter() {
public void controlResized(ControlEvent e) {
initializeBounds();
shell.getDisplay().timerExec(2000, new Runnable() {
@Override
public void run() {
top.setFocus();
txtAlias.setFocus();
}
});
}
});
But without results...
Do you know how can I do it?
Thanks in advance.
|
|
|
|
|
|
|
Re: Focus on a Text in a Dialog [message #898393 is a reply to message #898334] |
Thu, 26 July 2012 10:17 |
Ivan Furnadjiev Messages: 2429 Registered: July 2009 Location: Sofia, Bulgaria |
Senior Member |
|
|
Hi David,
just checked it more precisely. Focusing is working with Chrome... but
not in other browsers (widget is highlighted, but can't type in it).
Please open a bugzilla about this issue.
Thanks,
Ivan
On 7/26/2012 11:46 AM, David Casas wrote:
> Hi Ivan,
>
> I have checking eclipse controls demo and I am not seeing setFocus is
> working. On the http://rap.eclipsesource.com/rapdemo/examples#dialog,
> if you click on Login dialog you won't see focus at all. However, if
> we see the code, we will see:
>
> private void initilizeDialogArea() {
> if( message != null ) {
> mesgLabel.setText( message );
> }
> if( username != null ) {
> userText.setText( username );
> }
> userText.setFocus();
> }
>
> Do I have to open a bug?
--
Ivan Furnadjiev
Twitter: @EclipseRAP
Blog: http://eclipsesource.com/blogs/
Professional services for RAP and RCP?
http://eclipsesource.com/services/rap/
|
|
|
Re: Focus on a Text in a Dialog [message #912893 is a reply to message #898393] |
Fri, 14 September 2012 11:09 |
Eclipse User |
|
|
|
Is there a request for this yet, I could not find it?
Am 26.07.2012 12:17, schrieb Ivan Furnadjiev:
> Hi David,
> just checked it more precisely. Focusing is working with Chrome... but
> not in other browsers (widget is highlighted, but can't type in it).
> Please open a bugzilla about this issue.
> Thanks,
> Ivan
>
> On 7/26/2012 11:46 AM, David Casas wrote:
>> Hi Ivan,
>>
>> I have checking eclipse controls demo and I am not seeing setFocus is
>> working. On the http://rap.eclipsesource.com/rapdemo/examples#dialog,
>> if you click on Login dialog you won't see focus at all. However, if
>> we see the code, we will see:
>>
>> private void initilizeDialogArea() {
>> if( message != null ) {
>> mesgLabel.setText( message );
>> }
>> if( username != null ) {
>> userText.setText( username );
>> }
>> userText.setFocus();
>> }
>>
>> Do I have to open a bug?
>
|
|
|
Re: Focus on a Text in a Dialog [message #913111 is a reply to message #912893] |
Fri, 14 September 2012 19:54 |
Rüdiger Herrmann Messages: 581 Registered: July 2009 |
Senior Member |
|
|
Bug 386053 - [Text] setFocus does not work under some constellation
https://bugs.eclipse.org/bugs/show_bug.cgi?id=386053
On 14.09.2012 13:09, Markus Krüger wrote:
> Is there a request for this yet, I could not find it?
>
> Am 26.07.2012 12:17, schrieb Ivan Furnadjiev:
>> Hi David,
>> just checked it more precisely. Focusing is working with Chrome... but
>> not in other browsers (widget is highlighted, but can't type in it).
>> Please open a bugzilla about this issue.
>> Thanks,
>> Ivan
>>
>> On 7/26/2012 11:46 AM, David Casas wrote:
>>> Hi Ivan,
>>>
>>> I have checking eclipse controls demo and I am not seeing setFocus is
>>> working. On the http://rap.eclipsesource.com/rapdemo/examples#dialog,
>>> if you click on Login dialog you won't see focus at all. However, if
>>> we see the code, we will see:
>>>
>>> private void initilizeDialogArea() {
>>> if( message != null ) {
>>> mesgLabel.setText( message );
>>> }
>>> if( username != null ) {
>>> userText.setText( username );
>>> }
>>> userText.setFocus();
>>> }
>>>
>>> Do I have to open a bug?
>>
--
Rüdiger Herrmann
http://codeaffine.com
|
|
|
Powered by
FUDForum. Page generated in 0.03127 seconds