[Gambas-user] TAB and TextArea
Matti
math.eber at ...221...
Wed Aug 1 23:05:16 CEST 2012
I agree.
It was just the "oops"-feeling when you move through a form with TAB and don't
get further. But then you have the mouse.
I think, indentation is more important - leave it this way.
Am 01.08.2012 22:45, schrieb Tobias Boege:
> On Wed, 01 Aug 2012, Matti wrote:
>> Recently, there was a question about the TAB Focus. Testing this, I saw:
>> In every control the TAB key is used to move the cursor to the next control.
>> But TextArea behaves different: the TAB key inserts spaces into the control and
>> doesn't move the cursor.
>> I'm not sure if this is wanted behaviour or not.
>> Should the TAB key switch to the next control, should it insert spaces, or
>> should there be an option?
>> Regards Matti
>>
>
> I'm sure, nobody would like to miss the ability to insert tabs/spaces using
> the Tab key. It is not default in Gambas to indent using Tabs (actually, you
> can indent with the Tab key in the source code editor but it is filled with
> spaces, right?) but think of other Editors/programming languages where the
> Tab is a fundamental character for indentation.
> Essentially: yes, I'm sure it is intentional.
>
> However, if you feel to not allow the Tab key to insert tabs, you have sort
> of an option to do so:
>
> Public Sub TextArea1_KeyPress()
> If Key.Code = Key["Tab"] Then
> ' Move focus to next control somehow
> Stop Event ' Stop insertion of the Tab character
> Endif
> End
>
> I don't know if this code works and how to move the focus to the next
> controls (Is there any representation of this Hierarchy tab from the form
> editor somewhere at runtime?) but you got the idea, hopefully.
>
> This could be turned into an property-like option for the TextArea and
> related controls but it's not me to decide that.
>
> Regards,
> Tobi
More information about the User
mailing list