rraswisak Active Member Licensed User Longtime User Jan 22, 2019 #1 Hi all, Floating text field is very interesting, so is it possible to add more feature to XUI Views Library, ie: 1. Multi line option for B4XFloatTextField 2. Set text alignment for B4XFloatTextField 2. B4XComboBox with Floating text field style Thank you
Hi all, Floating text field is very interesting, so is it possible to add more feature to XUI Views Library, ie: 1. Multi line option for B4XFloatTextField 2. Set text alignment for B4XFloatTextField 2. B4XComboBox with Floating text field style Thank you
Erel B4X founder Staff member Licensed User Longtime User Jan 22, 2019 #2 1. Not sure that multiline support will add much. It will look strange to have a multiline field with a floating hint. 2. This one is already possible: Code: Copy B4XFloatTextField.TextField.SetTextAlignment(...)
1. Not sure that multiline support will add much. It will look strange to have a multiline field with a floating hint. 2. This one is already possible: Code: Copy B4XFloatTextField.TextField.SetTextAlignment(...)
rraswisak Active Member Licensed User Longtime User Jan 22, 2019 #3 Thanks for your reply, if the point 1 is possible then i need to set the alignment to LEFT_TOP of the FloatingText (seting in designer not affect) i was create this input data form with B4J: It is efficient of using Floating text rather than add more label for field information The Description field will required detail information which is need for multi-line data. The combo box is quite okay, but if it can be same view with FloatingText was fantastic Code: Copy B4XFloatTextField1.TextField.SetTextAlignment("TOP","LEFT") using above code generate this error: main._appstart (java line: 95) java.lang.RuntimeException: Type does not match (class javafx.scene.control.TextField) at anywheresoftware.b4a.objects.B4XViewWrapper.typeDoesNotMatch(B4XViewWrapper.java:547) at anywheresoftware.b4a.objects.B4XViewWrapper.SetTextAlignment(B4XViewWrapper.java:431) at b4j.example.main._appstart(main.java:95) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at anywheresoftware.b4a.BA.raiseEvent2(BA.java:91) at anywheresoftware.b4a.BA.raiseEvent(BA.java:78) at b4j.example.main.start(main.java:37) at com.sun.javafx.application.LauncherImpl.lambda$launchApplication1$162(LauncherImpl.java:863) at com.sun.javafx.application.PlatformImpl.lambda$runAndWait$175(PlatformImpl.java:326) at com.sun.javafx.application.PlatformImpl.lambda$null$173(PlatformImpl.java:295) at java.security.AccessController.doPrivileged(Native Method) at com.sun.javafx.application.PlatformImpl.lambda$runLater$174(PlatformImpl.java:294) at com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:95) at com.sun.glass.ui.win.WinApplication._runLoop(Native Method) at com.sun.glass.ui.win.WinApplication.lambda$null$148(WinApplication.java:191) at java.lang.Thread.run(Thread.java:748) Click to expand...
Thanks for your reply, if the point 1 is possible then i need to set the alignment to LEFT_TOP of the FloatingText (seting in designer not affect) i was create this input data form with B4J: It is efficient of using Floating text rather than add more label for field information The Description field will required detail information which is need for multi-line data. The combo box is quite okay, but if it can be same view with FloatingText was fantastic Code: Copy B4XFloatTextField1.TextField.SetTextAlignment("TOP","LEFT") using above code generate this error: main._appstart (java line: 95) java.lang.RuntimeException: Type does not match (class javafx.scene.control.TextField) at anywheresoftware.b4a.objects.B4XViewWrapper.typeDoesNotMatch(B4XViewWrapper.java:547) at anywheresoftware.b4a.objects.B4XViewWrapper.SetTextAlignment(B4XViewWrapper.java:431) at b4j.example.main._appstart(main.java:95) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at anywheresoftware.b4a.BA.raiseEvent2(BA.java:91) at anywheresoftware.b4a.BA.raiseEvent(BA.java:78) at b4j.example.main.start(main.java:37) at com.sun.javafx.application.LauncherImpl.lambda$launchApplication1$162(LauncherImpl.java:863) at com.sun.javafx.application.PlatformImpl.lambda$runAndWait$175(PlatformImpl.java:326) at com.sun.javafx.application.PlatformImpl.lambda$null$173(PlatformImpl.java:295) at java.security.AccessController.doPrivileged(Native Method) at com.sun.javafx.application.PlatformImpl.lambda$runLater$174(PlatformImpl.java:294) at com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:95) at com.sun.glass.ui.win.WinApplication._runLoop(Native Method) at com.sun.glass.ui.win.WinApplication.lambda$null$148(WinApplication.java:191) at java.lang.Thread.run(Thread.java:748) Click to expand...
Erel B4X founder Staff member Licensed User Longtime User Jan 22, 2019 #4 My mistake. B4J TextField doesn't have a text alignment property. You should do it like this: Code: Copy CSSUtils.SetStyleProperty(B4XFloatTextField1.TextField, "-fx-alignment", "CENTER") Note that it won't change the hint position.
My mistake. B4J TextField doesn't have a text alignment property. You should do it like this: Code: Copy CSSUtils.SetStyleProperty(B4XFloatTextField1.TextField, "-fx-alignment", "CENTER") Note that it won't change the hint position.