That works

Seems like it would be same code to center TextField as TextArea,

Odd.

Regards

On Friday, October 9, 2020 at 12:00:40 AM UTC-4, Shai Almog wrote:

> We don't support centering a text field at this time. Only a text area 
> (multiline) and even then not when editing. So when you move to editing 
> mode it will jump to the left/right respectively. 
>
> Center text field has a bit of a nuanced behavior and it's hard to 
> replicate it when going back and forth between native editing and 
> lightweight. 
>
> On Thursday, October 8, 2020 at 7:20:43 PM UTC+3 shop.servic...@gmail.com 
> wrote:
>
>> If you are experiencing an issue please mention the full platform your 
>> issue applies to:
>> IDE: NetBeans/Eclipse/IDEA Netbeans  12.2
>> Desktop OS Windows 10 Pro
>> Simulator latest
>> Device simulator IOS, Android
>>
>> Please suggest how to center align a textField with params as below.
>> Always justifies to RIGHT. LEFT works correctly
>>
>>             Form hi = new Form("Center Text in TextField", BoxLayout.y());
>>             TextField txt = new TextField("55565");
>>             txt.setEditable(true);
>>             txt.getAllStyles().setAlignment(TextField.CENTER);
>>             txt.setSingleLineTextArea(true);
>>             txt.setConstraint(TextField.DECIMAL);
>>             hi.add(txt);
>>             hi.show();
>>
>> Regards
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"CodenameOne Discussions" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to codenameone-discussions+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/codenameone-discussions/8a11af10-319a-4207-bad4-c359109aa238o%40googlegroups.com.

Reply via email to