Thank you for your advice, I am using a native library(android, iOS) that 
requires a native UITextField/EditText as input, that's why I created a 
native textfield.

I don't know if is it possible to get access to TextField in native code as 
UITextField/EditText, if this the case no need to create this native 
TextField. and i will use this in my native code.

On Monday, November 4, 2019 at 1:42:45 PM UTC+1, Steve Hannah wrote:
>
> When you create a native component, it's up to you to "style" it.  You 
> might want to check out the cn1-native-controls cn1lib as a reference, as I 
> include a native text field component with it.
>
> https://github.com/shannah/cn1-native-controls
>
> The strategy that I used here was to add a method to the native interface 
> "updateStyles()", which, when called, updates the styles of the native 
> component based on the styles assigned to its lightweight container.
>
>
> https://github.com/shannah/cn1-native-controls/blob/master/native/ios/com_codename1_nui_NTextFieldNativeImpl.m
>
> Note;  I don't recommend creating your own native text field unless you 
> have a really good reason.  There are all kinds of complexities around 
> making native text fields work properly, and the built-in TextField and 
> TextArea components already take care of all of these things for you.
>
> On Mon, Nov 4, 2019 at 2:02 AM Hasni Faiçal <[email protected] 
> <javascript:>> wrote:
>
>> If you are experiencing an issue please mention the full platform your 
>> issue applies to:
>> IDE: NetBeans/Eclipse/IDEA
>> Desktop OS
>> Simulator 
>> Device
>>
>> 1- I created a nativeCall to return a PeerComponent as a (UITextField, 
>> EditText) for iOS and android respectively.
>> How to add look and feed for this text field to look the same as CN1 
>> TextField?
>> 2- Is there any way to interact with this native TextField (eg. setting 
>> hint) without implementing this behavior in native code?
>> 3- Is there any way to access UITextField and EditText from CN1 TextField 
>> in native code?
>>
>> -- 
>> 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 [email protected] 
>> <javascript:>.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/codenameone-discussions/a691e1bf-8daa-4e13-be60-b4e6d677a43c%40googlegroups.com
>>  
>> <https://groups.google.com/d/msgid/codenameone-discussions/a691e1bf-8daa-4e13-be60-b4e6d677a43c%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>>
>
>
> -- 
> Steve Hannah
> Software Developer
> Codename One
> http://www.codenameone.com
>

-- 
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/codenameone-discussions/d07a8517-1bef-4662-a240-b0b5e825cc95%40googlegroups.com.

Reply via email to