Antes de B4XPages probe crear una aplicacion desktop en modo full screen, habia varias formas de lograr esto, con fx.screen y sus propiedades, con JAVAOBJECT y fijando la forma como maximizada, etc.
Ahora probe uno de esos codigos con B4XPages y salta un error.
Alguien ha probado a crear una app asi? desktop, b4j, b4xpages, full screen?
Dim Stage As JavaObject = B4XPages.GetNativeParent(Me)
Stage = Stage.GetField("stage")
' Stage.RunMethod("centerOnScreen",Null)
' Stage.RunMethod("setFullScreen",Array As Object(True))
Stage.RunMethod("setMaximized", Array As Object(True))
Here are some formutilities that I find useful pretty often. So I put them all in one static class And I thought I'd share it. The most important one, I just found (GetIcons in the lib) allows you to add an icon to display it in the taskbar when the form is minimized (Iconified), I've been...
1. el get native parent retorna un Form. A este se le puede aplicar el fx - dimensiones. Perfecto. Esto funciona. Pero hay un pequeño margen de un par de pixeles no ocupados de la pantalla por la forma de la aplicacion. Solo es una duda existencial.
2. Tambien recuerdo haber retirado los controles de minimizar, maximizar y cerrar del extremo superior derecho con un setformstyle UNDECORATED; aplicar esto mismo al get native arroja este error.
B4X:
Waiting for debugger to connect...
Program started.
Ha ocurrido un error en la línea: 276 (B4XPagesManager)
java.lang.reflect.InvocationTargetException
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
...
Caused by: java.lang.IllegalStateException: Cannot set style once stage has been set visible
at javafx.graphics/javafx.stage.Stage.initStyle(Stage.java:484)
at anywheresoftware.b4j.objects.Form.SetFormStyle(Form.java:279)
at b4j.example.b4xmainpage._b4xpage_created(b4xmainpage.java:80)
y basicamente esto se corrige usando set form style desde
B4X:
Sub AppStart (Form1 As Form, Args() As String)
MainForm = Form1
[B] MainForm.SetFormStyle("UNDECORATED")[/B]
MainForm.Show
Ahora nada mas falta agregar los controles de un modo diferente al habitual.
B4XPages is a library that serves two purposes: 1. Make it simple to develop B4A apps by solving almost all of the challenges involved with Android complex activities life cycle. B4XPages makes B4A behave more similar to B4J and B4i where the new "B4XPage" element is a regular object that is...