### Development Hints

Various Development Hints with Workarounds gathered during tests.
Status: 20170723.
Title Bar Form
The title bar of the One Window Form is not displayed.
Workaround
Create a title bar, which could be a label or a pane with several nodes.
Close One Window Application
As there is no title bar with (classic) system buttons minimize, maximize, close, how to close the application?
Workaround
Ensure to define a subroutine to close the One Window UI-Application, like a Close Button.
Another option, is to close the application using key combination ALT+F4.
External Libraries
When using external libraries (e.g. jPi4J), set the Project Attribute MergeLibraries to True.
#Region Project Attributes
#MergeLibraries: True
#End Region
Pixel ScreenSaver
Pixel ScreenSaver does not work when the One Window UI-Application is running.
Workaround
Not found.
Possible options:
1. Trigger, via jShell, the command "vcgencmd display_power 0 | 1"
or
2. Timer and check for inactivity.
Cursor Changing Shape
When screen size maximized, the cursor changes from default to a black cursor.
Workaround
Set the screen size to maximum - an offset of 20 (or higher). This depends on the monitor used.
'Set the form to fill the screen with an offset
`Sub SetFormFillScreenOffset(frm As Form, offset As Int) ' ignore
Dim ps As Screen = fx.PrimaryScreen
frm.WindowLeft = ps.MinX + offset
frm.WindowWidth = ps.MaxX - frm.WindowLeft - offset
frm.WindowTop = ps.MinY + offset
frm.WindowHeight = ps.MaxY - frm.WindowTop - offset
End Sub`
Memory glGetError
Memory Error glGetError 0x505 or the B4J IDE Logs, like
java.lang.NullPointerException
at com.sun.prism.impl.ps.PaintHelper.initGradientTextures(PaintHelper.java:131)
at com.sun.prism.impl.ps.PaintHelper.getGradientTexture(PaintHelper.java:141)
...
Workaround
Increase the Raspberry Pi GPU memory from default 64 to at least 128 or 256 MB.
Note:
Be carefull using resources, i.e. a Label with Font size of 255 consumes high amount of GPU memory.
Screen Resolution
When running an UI application, the screen is a full black screen filled with the mainform size.
The back screen should have the size of the monitor attached.
If the black screen is not fully filling the monitor, check the screen resolution in the Raspberry Pi Configuration.
Workaround
sudo raspi-config > advanced options > resolution, then select the attached monitor resolution.
This might take some iterations.
The HDMI settings in the file /boot/config.txt are set accordingly.
Example:
Get the screen resultion:
tvservice -s
Sample Output:
state 0x12000a [HDMI DMT (82) RGB full 16:9], 1920x1080 @ 60.00Hz, progressive
The HDMI entries in /boot/config.txt are (these are set when changing the settings using sudo raspi-config):
hdmi_group=2
hdmi_mode=82
Buttons
To make buttons better visible, an option is to set the Button Border Properties to:
Border Color Black, Border Width 1, Corner Radius 3.

Changed: 2018-05-08 09:54, Category: Raspberry Pi UI JavaFXPorts, File: T6C239M1749.htm, ID: 1749