B4J Question [SOLVED] [AB Material] How to make Ordered List with indentation?

incendio

Well-Known Member
Licensed User
Longtime User
Hi ,

I don't know if Ordered List with indentation is the right term.

Take a look the attached image, can I make like that in AB Material?

If it can, please tell me how.
Thanks in advance.
 

Attachments

  • List.png
    3.8 KB · Views: 142

alwaysbusy

Expert
Licensed User
Longtime User
An example is shown in the Demo on the GettingStartedPage.

B4X:
Dim iList As ABMItemList
iList.Initialize(page, "iList", ABM.ITEMLIST_TYPE_NUMBERS)
iList.BulletColor = ABM.COLOR_ORANGE
iList.BulletColorIntensity = ABM.INTENSITY_DARKEN1
iList.AddItem(CreateItem(1,"You start compiled .jar file on your server (e.g. {B}java -jar MyApp.jar{/B})"), "iListItem")
iList.AddItem(CreateItem(2,"A user loads the app in his browser (e.g. http://localhost:51042/MyApp)."), "iListItem")
iList.AddItem(CreateItem(3,"The request passes through the ABMCacheControl to set/get cache settings"), "iListItem")
iList.AddItem(CreateItem(4,"The WebApp redirects the user to {B}InitialPage{/B} defined in ABMApplication."), "iListItem")
iList.AddItem(CreateItem(5,"A new instance of your page class is created (Initialize is called, we call the {B}BuildPage(){/B} method containing the GRID structure of our page)."), "iListItem")
iList.AddItem(CreateItem(6,"WebSocket_Connected is called when the DOM of the page in the browser is fully loaded:"), "iListItem")
iList.AddItem(CreateSubItems(1), "iSubListItem")
iList.AddItem(CreateItem(7,"Everything is send to the Browser.  We finish this method by doing a {B}page.Refresh{/B} and tell the browser we’re done by calling {B}page.FinishedLoading{/B}."), "iListItem")
iList.AddItem(CreateItem(8,"When the user leaves the page, a {B}beforeunload{/B} event is raised."), "iListItem")
iList.AddItem(CreateItem(9,"{B}WebSocket_Disconnected{/B} is called."), "iListItem")
iList.AddItem(CreateItem(10,"If no reconnection happens after some time, the session is destroyed by the server.  De {B}cache scavenger{/B} will do some cleanup."), "iListItem")
    
page.Cell(1,1).AddComponent(iList)
...
Sub CreateSubItems(ID As Int) As ABMItemList
    Dim iSubList As ABMItemList
    iSubList.Initialize(page, ID, ABM.ITEMLIST_TYPE_DISC)
    iSubList.BulletColor = ABM.COLOR_ORANGE
    iSubList.BulletColorIntensity = ABM.INTENSITY_DARKEN1
    iSubList.AddItem(CreateItem(1, "If it is an {B}existing session which exists in the cache{/B}, the page and all global variables are restored from the {B}cache{/B}."), "SubItem")
    iSubList.AddItem(CreateItem(2, "If it is a {B}reconnecting session not in the cache{/B}, the page is {B}reloaded{/B}."), "SubItem")
    iSubList.AddItem(CreateItem(3, "If it is a {B}new session not in the cache{/B}, the page is loaded and the {B}ConnectPage(){/B} method is called."), "SubItem")

    Return iSubList
End Sub

Alwaysbusy
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…