[Gambas-user] Tab's

Gianluigi bagonergi at gmail.com
Sun Jul 15 14:03:43 CEST 2018


I try to explain myself better:
You need to activate the gb.desktop component, and then type:

Public Sub Form_KeyPress() ' Or Key_Release()

  If Key.code = Key.Return Then
    Desktop.SendKeys("[Tab]")
  Endif

End

Regards
Gianluigi


2018-07-15 9:18 GMT+02:00 Gianluigi <bagonergi at gmail.com>:

> And if You use Key.Return?
>
> Regards
> Gianluigi
>
> 2018-07-15 2:23 GMT+02:00 Shane <buster6seven at gmail.com>:
>
>> gave this a try and its not working
>>
>> my code
>>
>> if key.code = key["ENTER"] then
>>
>> my sent key.code = 65293 and the value for key["ENTER"] = 65421
>>
>> i tried this with if key.code = key.enter and got the same result whats
>> going on ?
>>
>> cheers Shane.
>>
>> On 14/07/18 23:54, Adam Ant wrote:
>>
>> As far as I remember, you will need to use the KeyRelease event,
>> something along the lines of:
>>
>> Public Sub MyControl_KeyRelease(???)
>>
>>   If Key = Key.Return then
>>      MyControl.Next.Activate ' or MyControl.Next.SetFocus
>>
>> or something like that. It's been a year or so....
>> This IIRC works for most controls, maybe not gridview and posibly
>> checkbox?
>>
>> hth
>> Bruce
>>
>>
>> On Sat, Jul 14, 2018 at 5:48 PM, Bill <bill-lancaster at brackenwood.one>
>> wrote:
>>
>>> I use the Activate event and the LostFocus so that either the 'enter'
>>> key or the tab key moves to the next control after the contents of the text
>>> box has been checked
>>>
>>> Bill
>>>
>>>
>>>
>>> On 14/07/18 08:29, Shane wrote:
>>>
>>>> Yep got that
>>>>
>>>> but i want to this while in my program not the ide
>>>>
>>>> so in my program i want to press enter and it would act like i was
>>>> pressing the tab key
>>>>
>>>> hope this make scene
>>>>
>>>> thanks for your help
>>>>
>>>> regrades Shane.
>>>>
>>>>
>>>> On 14/07/18 15:57, Karl Reinl wrote:
>>>>
>>>>> Am Samstag, den 14.07.2018, 14:33 +1000 schrieb Shane:
>>>>>
>>>>>> how can I enter a value in a component and then press enter and have
>>>>>> my
>>>>>> program tab into the next component in the tab order?
>>>>>>
>>>>>>
>>>>>> cheers Shane.
>>>>>>
>>>>>> Salut Shane,
>>>>>
>>>>> on a form, choose the property window and open the second Tab (think
>>>>> its
>>>>> called hierarchy)
>>>>>
>>>>
>>>>
>>>> ----[ 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 ]----
>>
>>
>>
>>
>> ----[ 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/20180715/7d494582/attachment.html>


More information about the User mailing list