Problem with EditTexts in a ScrollView

JoanRPM

Active Member
Licensed User
Longtime User
Hello all.
I put EditTexts in a ScrollView.
I need to define the properties "Input Type" of each cell, and because they are not all I need, I will create.
To do this, I need to know where pressed inside the ScrollView. An example of Klaus does it with a Label and working properly.
I've implemented the EditText and the problem is I need to press 2 times the cell to detect that I pressed.
How I can do it with just one touch?

PD. In the example below, the first 3 positions are with "Input Type" = TEXT. The following are those which would implement the code, and "Input Type" = NONE (no keyboard).

Thanks.
 

Attachments

  • test.zip
    5.9 KB · Views: 287
Last edited:

klaus

Expert
Licensed User
Longtime User
Attached you find a modified version of your program.

EditText views have a different behaviour than Label views.
When you first click on an EditText it gets the focus and nothing else.
The click event is raised when the EditText has the focus. Therefor you need two clicks to show the panel, the first to get the focus the second for the click.
In the modified version there are different event routines for the Label and the EditText views.
For the EditText views there are two event routines edtView_FocuChanged and edtView_Click. In the edtView_FocusChanged routine the panel is shown if HasFocus = True and if edt.InputType = edt.INPUT_TYPE_NONE.

Best regards.
 

Attachments

  • test_new.zip
    6.2 KB · Views: 385
Upvote 0

JoanRPM

Active Member
Licensed User
Longtime User
Oh, you're right!. I had to do with the edtView property.
With only the edtView_FocuChanged property it's working fine.

Thank you very much.
 
Upvote 0
Top