It is time consuming to create the elements in the user interface GUI.
This has become more relevant for me in using AI to create code because AI declares the UI elements in the Process_Globals sub but does not create the UI. So I have to do it manually.
Not any more!
A MASSIVE THANK YOU TO WILLIAM LANCEE!!! He added BalConverter to my code so that it creates the layout file directly. No intermediate JSON to convert!
This code accepts input of your variable declarations such as this (These are the supported Designer Types):
and gives layout files for all of the B4X apps.
The resulting UI in the GUI editor has each type of UI element across the top. All elements of the same type will be in a separate column. Zoom out on the GUI to see them all:
Here is a zoomed in view:
After running this code, click on the link to open the location of the layout files.
This has become more relevant for me in using AI to create code because AI declares the UI elements in the Process_Globals sub but does not create the UI. So I have to do it manually.
Not any more!
A MASSIVE THANK YOU TO WILLIAM LANCEE!!! He added BalConverter to my code so that it creates the layout file directly. No intermediate JSON to convert!
This code accepts input of your variable declarations such as this (These are the supported Designer Types):
UI Declarations:
Private Accordion1 As Accordion
Private Canvas1 As Canvas
Private CheckBox1 As CheckBox
Private ChoiceBox1 As ChoiceBox
Private ColorPicker1 As ColorPicker
Private ComboBox1 As ComboBox
Private DatePicker1 As DatePicker
Private HTMLEditor1 As HTMLEditor
Private Label1 As Label
Private MenuBar1 As MenuBar
Private Pagination1 As Pagination
Private ProgressBar1 As ProgressBar
Private ProgressIndicator1 As ProgressIndicator
Private ScrollPane1 As ScrollPane
Private Slider1 As Slider
Private Spinner1 As Spinner
Private SplitPane1 As SplitPane
Private ToggleButton1 As ToggleButton
Private TreeTableView1 As TreeTableView
Private TreeView1 As TreeView
Private WebView1 As WebView
Private TextField1 As TextField
Private RadioButton1 As RadioButton
Private Button1 As Button
Private ListView1 As ListView
Private TextArea1 As TextArea
Private Pane1 As Pane
and gives layout files for all of the B4X apps.
The resulting UI in the GUI editor has each type of UI element across the top. All elements of the same type will be in a separate column. Zoom out on the GUI to see them all:
Here is a zoomed in view:
After running this code, click on the link to open the location of the layout files.
Attachments
Last edited: