Other Thoughts about the tutorials

IslandMedic

Member
Licensed User
Longtime User
Since I have taken up the b4a and b4j environments I have struggled like never before to learn how to use these tools. Yes I am a bit of a dinosaur from the late 90's but I am pretty smart and have learned how to research and look for answers on my own. The event driven world is a challenge but do able. I wanted to post my observation so that hopefully others can benefit.

I will copy a snippet from the tabpane tutorial:

B4X:
B4J v1.06 adds support for TabPane. TabPane is similar to Android TabHost or Windows TabControl.

You can either use the designer to create the TabPane and the Tabs (TabPages) or create them with code.
It is easier to use the designer, however in this example we will add them programmatically.

The first step is to create a TabPane. TabPane holds a List of TabPages.

We then create several TabPages and add them to this list. Each TabPage holds a Pane which is the actual content.

So after reading this thread I realize that I want to use the internal designer so i go there and plop a tabpane down and wow that was easy. But then I realize I can't drop form elements in the designer on each tab. So I then come back to this tutorial and no where does it talk about using the designer to manage tabs or putting stuff on the tabs. So I am left now with no example or how to with respect to the designer because this tutorial is only for code application.

So what do I do now? I search around and fine people struggling as well but the questions asked and the answers given assume so much that the inexperienced and beginner people are left more confused than they were before they started looking.

I guess what I find frustrating is that a great tool is created like the designer but no example videos or tutorials on how to actually use the tool with different views. I know that the gui can do everything with the views and code has to be written to interact with them, but show us how to do that. Don't make a statement like:

"You can either use the designer to create the TabPane and the Tabs (TabPages) or create them with code.
It is easier to use the designer,..."

and then leave us hanging with no where to go. I am sure the developers are hard at work with new features and improvements but if the beginner users get so discouraged that they leave what is the point of keep pumping out new versions.

Probably shooting myself in the foot here but I am committed to the environment as I have invested too much time to try something else. On ward and upward. My intent is not disrespect anyone's efforts only to point out what my experience has been and if it can help then great if not then I just keep on trudging.
 

DonManfred

Expert
Licensed User
Longtime User
in the B4JHowTo2 Tutorials i found

To add Tabs to the TabPane, three options are outlined.

#Using the JavaFX Scene Builder
To add Tabs without programming using the JavaFX Scene Builder:
After the TabPane has been added, select a Tab in the Hierachy, then right mouseclick, select duplicate from the popupmenu.
A new Tab is added.

#Editing the Layout File
Open the layout fxml file (from the files folder) in a texteditor, copy & paste a tab section, like <Tab text="Tab 1"> ... </Tab> and
make further changes required.

#Via B4J code
'TabPane class reference: https://docs.oracle.com/javafx/2/api/javafx/scene/control/TabPane.html
Sub Process_Globals
..
Private tpMain As TabPane
End Sub

'Add a new tab = TabPage to the TabPane
Sub btnTabAdd_Action
Dim tabpageNew As TabPage
tabpageNew.Initialize
tabpageNew.Id = "tabpage" & (tpMain.Tabs.Size + 1)
tabpageNew.Text = "Tab " & (tpMain.Tabs.Size + 1)
tpMain.Tabs.Add(tabpageNew)
End Sub

So i guess it could be working just with a JavaFX Scene Builder.
 
Upvote 0

Erel

B4X founder
Staff member
Licensed User
Longtime User
All the views (that are exposed in B4J) work with the internal designer. The internal designer was added in v3.50 which was released after that specific tutorial. I will update the tutorial.

If you have any question then you are more than welcome to start a new thread and we will help you.
 
Upvote 0

b4auser1

Well-Known Member
Licensed User
Longtime User
I am even more dinosaur from the late 80's :) and want tell Erel and the B4x community many thanks for the great support of B4x products.
 
Upvote 0

IslandMedic

Member
Licensed User
Longtime User
I just wanted to say again my intent was not to make light of all the hard work that has gone into the product and the community but to say' as a new person to the product, what the challenges are that I face in the learning. Today I am gonna learn how to use the tab pane come hell or high water! :)

Brad
 
Upvote 0

Cableguy

Expert
Licensed User
Longtime User
First and easiest way to add views/controls/panes to a tab page is to create each page as a separate layout and then load it into the tab page in sub create. Beware of duplicate control names though!
 
Upvote 0
Top