B4X Booklets
B4X Help tools
Copyright: © 2024 Anywhere Software Edition 2.5
Last update: 2024.01.05
Table of contents 2 B4X Help tools
1 B4X platforms .............................................................................................................................. 4
2 Help tools ..................................................................................................................................... 5
2.1 Erel is Teaching Programming............................................................................................. 5
2.2 Search function in the forum ................................................................................................ 5
2.3 Search the forum with Google ............................................................................................. 8
2.4 Latest libraries widget in the forum ..................................................................................... 9
2.5 Libraries Google sheet ....................................................................................................... 10
2.6 Ask a question in the forum ............................................................................................... 11
2.6.1 Before asking a question in the forum ........................................................................... 11
2.6.2 How to ask a question in the forum ............................................................................... 11
2.7 Answer a question in the forum ......................................................................................... 16
2.8 B4X Help Viewer ............................................................................................................... 18
2.8.1 Toolbar ........................................................................................................................... 20
2.8.2 Setup paths .............................................................................................. 21
2.8.3 b4xlib XML help files .................................................................................................... 22
2.8.4 Search engine ......................................................................................................... 23
2.9 Help documentation - B4A Object Browser ...................................................................... 24
2.10 B4X Booklets online .......................................................................................................... 25
2.10.1 From the IDE ............................................................................................................. 25
2.10.2 From an Internet browser ........................................................................................... 26
2.11 Useful links ........................................................................................................................ 27
2.11.1 B4A ............................................................................................................................ 27
2.11.2 B4i .............................................................................................................................. 28
2.11.3 B4J ............................................................................................................................. 29
2.11.4 B4R ............................................................................................................................ 30
2.12 Books ................................................................................................................................. 31
Table of contents 3 B4X Help tools
Main contributors: Klaus Christl (klaus), Erel Uziel (Erel)
To search for a given word or sentence use the Search function in the Edit menu.
All the source code and files needed (layouts, images etc.) of the example projects in this booklet
are included in the SourceCode folder.
For each program there are three folders.
SourceCode
MyFirstProgram
B4A
MyFirstProgram.b4a
B4i
MyFirstProgram.b4i
B4J
MyFirstProgram.b4j
Both programs MyFirstProgram and SecondProgram are almost the same for B4A, B4i and B4J.
Updated for following versions:
B4A version 12.80
B4i version 8.50
B4J version 10.00
B4R version 4.00
B4X Booklets:
B4X Getting Started
B4X Language
B4X IDE Integrated Development Environment
B4X Visual Designer
B4X Help tools
B4XPages Cros-platform projects
B4X CustomViews
B4X Graphics
B4X XUI B4X User Interface
B4X SQLite Database
B4X JavaObject NativeObject
B4R ExamplePrograms
You can consult these booklets online in this link [B4X] Documentation Booklets.
Be aware that external links don’t work in the online display.
1 B4X platforms 4 B4X Help tools
1 B4X platforms
B4X is a suite of programming languages for different platforms.
B4X suite supports more platforms than any other tool
ANDROID | IOS | WINDOWS | MAC | LINUX | ARDUINO | RASPBERRY PI | ESP8266 | AND
MORE...
• B4A Android
B4A is a 100% free development tool for Android applications, it includes all the features
needed to quickly develop any type of Android app.
• B4i iOS
B4i is a development tool for native iOS applications.
B4i follows the same concepts as B4A, allowing you to reuse most of the code and build
apps for both Android and iOS.
• B4J Java / Windows / Mac / Linux / Raspberry PI
B4J is a 100% free development tool for desktop, server and IoT solutions.
With B4J you can easily create desktop applications (UI), console programs (non-UI) and
server solutions.
The compiled apps can run on Windows, Mac, Linux and ARM boards (such as Raspberry
Pi).
• B4R Arduino / ESP8266
B4R is a 100% free development tool for native Arduino and ESP8266 programs.
B4R follows the same concepts of the other B4X tools, providing a simple and powerful
development tool.
B4R, B4A, B4J and B4i together make the best development solution for the Internet of
Things (IoT).
• B4XPages
B4XPages is an internal library for B4A, B4i and B4J allowing to develop easily cross-
platform programs.
B4XPages is explained in detail in the B4XPages Cross-platform projects booklet.
Even, if you want to develop only in one platform it is interesting to use the B4XPages
library it makes the program flow simpler especially for B4A.
2 Help tools 5 B4X Help tools
2 Help tools
To find answers to many questions about B4X the following tools are very useful.
2.1 Erel is Teaching Programming
Erel has made video tutorials for different subjects
These tutorials can be found in the forum at this link: https://www.b4x.com/etp.html
2.2 Search function in the forum
In the upper left corner, you find the
search box for the forum. Depending on
the window size it can be on the top right
side.
Enter a question or any keywords and press 'Return'.
The function shows you the posts that match your request.
Example: Enter the keyword ScrollView.
A list of the result is displayed below the menu.
Click on an item to show the thread.
2.2 Search function in the forum 6 B4X Help tools
And the result:
Click on the title to show the selected post.
2.2 Search function in the forum 7 B4X Help tools
On the left you have a list of forums which you can filter by products.
Example with B4i:
2.3 Search the forum with Google 8 B4X Help tools
2.3 Search the forum with Google
Sometines it is interesting to search in the forum with the Google search engine.
Example:
site:b4x.com -"Search Results" "[B4X] B4XPages" "Android Tutorial" -questions
• -"Search Results" searches for results
• "[B4X] B4XPages" search text filter
• "Android Tutorial" sub forum
Possible sub forums:
• "Android Question"
• "Android Tutorial"
• "Android Example"
• "Android Library"
• "iOS Question"
• "iOS Tutorial"
• "iOS Example"
• "iOS Library"
• "B4J Question"
• "B4J Tutorial"
• "B4J Example"
• "B4J Library"
• Etc
2.4 Latest libraries widget in the forum 9 B4X Help tools
2.4 Latest libraries widget in the forum
In the top right corner, you find the Latest libraries widget which lists the latest updated library
versions.
2.5 Libraries Google sheet 10 B4X Help tools
2.5 Libraries Google sheet
This site shows all the libraries available in the forum.
Columns:
• Library name.
• Short description.
• Files Names (without extension) for each platform.
• Last update.
• Author.
• IDE Comment, shown in the IDE in the Libraries Manager Tab.
• Forum link, not shown in the images.
2.6 Ask a question in the forum 11 B4X Help tools
2.6 Ask a question in the forum
If you have looked for an answer to your problem with the search function in the forum and didn’t
find a solution, you can ask a question in the forum.
Below you find a list with several points to take into account when you ask a question.
This is the best way to get rapidly a concrete solution.
The list is a summary of this thread in the forum:
For new(er) members: How to post a question / issue.
The numbering is a bit different from the post in the forum.
2.6.1 Before asking a question in the forum
Assume you're not the first person having that question.
1. Have you already looked in the forum for a solution?
2. Have you installed B4x as described?
3. Have you read relevant tutorials and / or the documentation?
[B4X] Erel Teaches Programming - video tutorials.
B4X Booklets.
2.6.2 How to ask a question in the forum
Before asking the question, select the right sub-forum for the right platform and type of question.
Click on the Forums tab to show all forums.
Select the right one.
Click on the button to start.
And then:
1. Always start a new thread for your question.
2. Give the title a meaningful sentence.
3. Describe what the problem is (full sentences, not 3 words, not "my car doesn't work - guess
what it is")
2.6 Ask a question in the forum 12 B4X Help tools
4. Please post the code within CODE TAGS and the error message from the Logs as TEXT.
Give the helpers a starting point , a code sample, a stripped out project that we can look at,
analyse and POINT YOU IN THE RIGHT DIRECTION…
Helpers may even provide a fully working solution based on YOUR WORK IN
PROGRESS!
To add code samples use the function :
Either directly in the ToolBox
or in the Insert function
This window is shown, you can copy code from the IDE directly in it.
Add some code, the result is below.
2.6 Ask a question in the forum 13 B4X Help tools
And the result.
You can also add another title than B4X and highlight lines.
And the result.
2.6 Ask a question in the forum 14 B4X Help tools
You can also select another language:
When you post a project, attach it as a zip file.
Generate it from the IDE:
And upload the file .
5. Don't post images of screen captures of Logs or error messages.
Post them as text (see point 3)!
Post only images illustrating the problem.
How to copy Logs, in the Logs Tab, right
click on the corresponding line:
You get a submenu with three options.
2.6 Ask a question in the forum 15 B4X Help tools
6. Assume that there are many experienced users having huge and complex apps.
B4X is working 100%. So, if you have an issue, it is mostly a programming mistake.
Do not start complex projects without any experience.
7. Many users in the forum love to help, but you need to help them to understand the issue
(see esp. 1 - 3).
8. When someone is trying to help you and asks questions for clarification, don't ignore these
questions because helpers need to understand what exactly your problem is.
9. Please, don't post the same questions in multiple different threads.
After resolving the error or problem, post the solution to share it with other users.
10. When a problem has been solved, and the solution added in the thread, please add [Solved]
to the title.
You can edit the thread title on top of the editing window.
And mark the post who answers your question as the "solution".
11. When you got help and it was useful, click on Like in the lower right corner of the post.
This shows the helper that you have read the post
and his help was useful.
No need to answer anything else.
12. And of course, have fun!
2.7 Answer a question in the forum 16 B4X Help tools
2.7 Answer a question in the forum
Several functions are available:
1. CODE Tags explained here.
2. QUOTE Tags, extract from an answer in the forum.
2.7 Answer a question in the forum 17 B4X Help tools
3. Add a link to another post.
To get the link to any post right click either:
on the date / time in the post title
or on the post number in the top right corner .:
You get this window.
Sorry, the texts are in French.
Copy the link address to the clip
board.
Insert a link
and paste the addres into the URL field.
2.8 B4X Help Viewer 18 B4X Help tools
2.8 B4X Help Viewer
This program shows xml help files. It was originally written by Andrew Graham (agrham) for B4A.
I modified it, with Andrews’ agreement, to show B4A, B4J, B4i, B4R and b4xlib xml help files.
The program can be downloaded from the forum.
In the top left corner, you can select the platform.
B4XXMLhelp are xml files for b4xlib libraries.
Here you can select ‘Standard’ or ‘Additional’ libraries.
And here, you find the list of the available libraries for the selected
platform and library type.
2.8 B4X Help Viewer 19 B4X Help tools
Then you find the list of objects for the selected library.
And below the objects list you find the list of all fields (F),
methods (M), events (E), and properties (P).
On the right side you find the details of the selected item.
The title on the top left contains the program name, its version and the full path of the current
selected library.
2.8 B4X Help Viewer 20 B4X Help tools
2.8.1 Toolbar
On the top right you have a toolbar:
With following buttons:
Setup paths displays the path setup form, where you can define the paths for the
different libraries and select the platforms you want to use.
Search engine for the selected library.
Link to the online Help in the forum. Link to this booklet.
Link to the B4X forum.
Link to the Android develppers site.
Link to the iOS developpers site.
Link to the Java developpers site.
Link to the B4X Documentation page.
It’s the same as if you click on Online Help in a B4X IDE.
When you click on one of the square buttons you will see a tooltip.
If you release the button outsides its surface nothing happens.
2.8 B4X Help Viewer 21 B4X Help tools
2.8.2 Setup paths
When you first run the application, or when you click on , you will be shown the form
below.
It contains default paths already preset.
You can uncheck unused platforms, these can be activated later when needed.
If your paths are different, enter them or use the to select the directory.
The directory will probably be like this for B4Aand similar for the other platforms:
C:\Program Files (x86)\Anywhere Software\B4ALibraries\ 32 bytes
C:\Program Files\Anywhere Software\B4A\Libraries\ 64 bytes
The Additional Libraries folder must have followed structure:
• B4A, B4i, B4J and B4J, one folder for each platform.
• B4X, one folder for the b4xlib libraries.
• B4XlibXMLFiles, one folder for b4xlib XML help files.
2.8 B4X Help Viewer 22 B4X Help tools
2.8.3 b4xlib XML help files
Standard and additional libraries are composed of two files, a library file and a help file which has
the xml extension.
b4xlibs don’t have an xml file by default.
To be able to display help for these libraries, Erel has written the b4xlib2XML program to generate
xml files for b4xlibs.
The b4xlib2XML program can be downloaded from:
https://www.b4x.com/android/forum/threads/tool-b4xlib-xml-generation.101450/#content
b4xlib libraries are explained in detail in the B4X XUI Booklet.
If you get this message:
That means that B4A was not installed in the default folder.
Click on and select the folder where you saved the B4A program, open the Libraies
folder and select Core.xml.
2.8 B4X Help Viewer 23 B4X Help tools
2.8.4 Search engine
Search engine for the selected library.
Example:
Selected library: Core
Enter DrawRect
And the result.
We get the object Canvas and two methods.
Click on an item in the list to show its help.
Click on to leave the search result list.
2.9 B4X Object browser 24 B4X Help tools
2.9 Help documentation - B4A Object Browser
This is also a standalone Windows program showing the help files of libraries.
It has been written by Vader and can be downloaded here.
A pdf documentation on how to use the program is part of the download.
2.10 B4X Booklets on line 25 B4X Help tools
2.10 B4X Booklets online
The B4X Documentation Booklets are available online!
2.10.1 From the IDE
In IDE Help menu / Online Help, you can directly show the main page of the B4X Documenation
page.
The links below allow you to display directly the selected booklet in the Intrenet browser.
The only drawback in these displays is that external links don’t work, this is a limitation of the tool
converting the pdf files.
2.10 B4X Booklets on line 26 B4X Help tools
2.10.2 From an Internet browser
In this link, you get the B4X Documentation Booklets page in the forum.
Scrolling a bit downwards you will see this:
The blue booklet names are links to display the selected booklet directly in the Internet browser.
The only drawback in these displays is that external links don’t work, this is a limitation of the tool
converting the pdf files.
2.11 Useful links 27 B4X Help tools
2.11 Useful links
2.11.1 B4A
Android Developers. Design Develop Distribute
Android Developers searching for any request.
In the upper right corner, you find the search field.
Enter View in the field:
Click on the link View | Android Developers.
And you get all the information about Views.
2.11 Useful links 28 B4X Help tools
2.11.2 B4i
iOS developers:
https://developer.apple.com/ios/human-interface-guidelines/overview/themes/
It’s the Apple site with all information about iOS.
2.11 Useful links 29 B4X Help tools
2.11.3 B4J
Oracle Overview FavaFX API:
http://docs.oracle.com/javase/8/javafx/api/toc.htm
2.11 Useful links 30 B4X Help tools
2.11.4 B4R
Arduino HomePages:
https://www.arduino.cc/en/Guide/HomePage
2.12 Books 31 B4X Help tools
2.12 Books
B4A book
Written by Philip Brown under the pseudo Wyken Seagrave.
http://pennypress.co.uk/b4a-book/
MagBook Build your own Android App.
Written by Nigel Whitfield.
http://www.magbooks.com/product/build-your-own-android-app/
2.12 Books 32 B4X Help tools
Elektor Android App development for electronics designers
https://www.elektormagazine.com/news/book-review-android-apps-development-with-basic-for-
android-b4a