B4A Library [B4X] [XUI] AS TextFieldAdvanced - Title, Information, Counter, Password, Button, Prefix, Suffix, Icons, Multiline

james_sgp

Active Member
Licensed User
Longtime User
Still doing the same thing, say there is no text in the view. When there is...
I`m downloading the b4xlib from ur first post, just to be clear
 

Alexander Stolte

Expert
Licensed User
Longtime User
Still doing the same thing, say there is no text in the view. When there is...
I can not confirm. I have gone through all 3 scenarios:
-Password hidden
-Password visible
-Normal text field
and each time the correct text was returned.
 

Attachments

  • AS_TextFieldAdvanced.b4xlib
    7.7 KB · Views: 122

wimpie3

Well-Known Member
Licensed User
Longtime User
Suppose you have 100 textboxes on your form, that means you'll have to populate all 100 of them manually, and save the values the user changed afterwards as well. Right? Would some kind of serialization be possible? A function that looks up all the fields on the screen, and saves the values in one giant JSON string? And the other way around, if you provide a JSON string, populate all the fields with the values from the JSON string? That might speed up development for large forms.
 

wimpie3

Well-Known Member
Licensed User
Longtime User
Put all your 100 textboxes on a panel and go through the panel with a for loop and create your jsom string.
Yes I was already planning on doing this. It was just a suggestion to add this to the library, I'm sure others would find use in it too. Nothing more. Keep up the good work!
 

wimpie3

Well-Known Member
Licensed User
Longtime User
What I seem to be missing (might have overlooked something though...)
- if you limit the number of characters to 5, you can still continue typing but the last characters are dropped: is there a way to simply block all input when the maximum number of character is reached?
- double tap to select the text in the entire field is not possible?
- is there a way to force numeric input only
- is there a way to force a date format (dd/mm/yyyy, mm/dd/yyyy, ...)
- is there a way to force a time format (24hr or AM/PM)
 

Alexander Stolte

Expert
Licensed User
Longtime User
- if you limit the number of characters to 5, you can still continue typing but the last characters are dropped: is there a way to simply block all input when the maximum number of character is reached?
You can set the view to read only, with the readonly property
- double tap to select the text in the entire field is not possible?
I use the native EditText, that's all I can do.
- is there a way to force numeric input only
Use the Designer property InputType and set in to Numeric.
- is there a way to force a date format (dd/mm/yyyy, mm/dd/yyyy, ...)
- is there a way to force a time format (24hr or AM/PM)
No. There are Text change events, use it to manipulate user input.
 

Almora

Active Member
Licensed User
Longtime User
ScrollView1.Panel.AddView(AS_TextFieldAdvanced1, 0dip, 0dip, ScrollView1.Width, ScrollView1.Panel.Height)
Is there a method for this..
thanks..
 

james_sgp

Active Member
Licensed User
Longtime User
Having an issue with version 1.17, i make the field 'read only' but the Clear Cross is still shown and functions on the right side of the field? How do I stop that?


James
 

Alexander Stolte

Expert
Licensed User
Longtime User
Update
  • 1.18
    • BugFix - ReadOnly = True - ClearButton and RevealButton are now also read only
'read only' but the Clear Cross is still shown
It will still be visible, only now it won't be triggered.
and functions on the right side of the field?
Check in the event for these buttons if the sender is read only. If you want that the buttons are no longer visible, then you have to hide them. But there are some use cases where you need these buttons even in read only mode, so I can't disable them just for you.
 

james_sgp

Active Member
Licensed User
Longtime User
I`ve updated the library, but its still showing as 1.15 & that there is an update to 1.18?
 

Attachments

  • Screenshot 2023-03-21 093557.jpg
    37.8 KB · Views: 89

cobra666

Member
Licensed User
Longtime User
in my app i am using color themes. how can i change colors (text / border). trying and failing with code.
 

Alexander Stolte

Expert
Licensed User
Longtime User
in my app i am using color themes. how can i change colors (text / border). trying and failing with code.
The view has no border colors?
TextColor can currently only be set in the Designer when you set the TextColor below, or when you control the TextField via the property. In the next update there will be a TextColor property.

In the next update there will be a bordercolor, but only if the view gets the fokus.
 

Herbert32

Active Member
Licensed User
Longtime User
Hello Alexander,

AS_TextFieldAdvanced.bas is missed in the B4A Example-Project
 
Cookies are required to use this site. You must accept them to continue using the site. Learn more…