[Gambas-user] Passing focus by code

Jorge Carrión shordi at gmail.com
Sat Jul 20 12:39:34 CEST 2019


Well... this is the example. It's just a little control for select in a
list. The "Select" key is Return or Enter keys. After that I want the
control to pass the focus to next control (Othercontrol in the example)
without use Desktop.Sendkeys. If this isn't possible I will leave this like
this. Is not essential for it.

Regards

El sáb., 20 jul. 2019 a las 7:53, Fabien Bodard (<gambas.fr at gmail.com>)
escribió:

> I think it will be more easy to  help you if you send a little example.
>
> Le ven. 19 juil. 2019 23:07, Rolf-Werner Eilert <rwe-sse at osnanet.de> a
> écrit :
>
>> I do not precisely get what you mean, but... could Control.SetFocus be a
>> solution?
>>
>> Am 19.07.2019 um 19:07 schrieb Jorge Carrión:
>>
>> Well I've done a little control who has a form with a TextBox and a
>> GridView inside. When type on Enter ot Tab keys I want pass the focus to
>> next control in the custom container who can take it.
>> I can't find a way to do this who works on all situations (my control
>> inside a container who is inside another container who is inside in a form
>> who is inside a tabstrip, etc. etc.)
>>
>> The me.next or me.previous reference doesn't work: They can be a HBox,
>> for example who takes the focus and user is lost.
>>
>> What I pretend is to emulate the Tab key behaviour... without use the
>> Desktop.sendkey. I don't want link desktop component to my custom control
>> only for that.
>>
>> Any clue?
>>
>> Best regards
>>
>>
>> ----[ Gambas mailing-list is hosted by https://www.hostsharing.net ]----
>>
>>
>>
>> ----[ Gambas mailing-list is hosted by https://www.hostsharing.net ]----
>>
>
> ----[ Gambas mailing-list is hosted by https://www.hostsharing.net ]----
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.gambas-basic.org/pipermail/user/attachments/20190720/2d4536db/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ListFind-0.0.1.tar.gz
Type: application/gzip
Size: 15835 bytes
Desc: not available
URL: <https://lists.gambas-basic.org/pipermail/user/attachments/20190720/2d4536db/attachment-0001.gz>


More information about the User mailing list