B4J Question [ABMaterial] Click and Events help!

hibrid0

Active Member
Licensed User
Longtime User
Hi guys I know maybe is really to basic question, but I'm playing with ABMaterial.
I can add some controls, now I want the way to make click with this code:

How can I make the events for click button?
I try this, and nothing to see on the console log.

B4X:
public Sub BuildPage()

page.AddRows(1,True, "").AddCells12(1,"") 
page.AddRowsM(1,True,0,0, "").AddCellsOS(12,0,0,0,1,1,1,"")
page.AddRows(3,True, "").AddCells12(1,"")
page.AddRowsM(1,True,0,0, "").AddCellsOS(2,0,0,0,6,6,6,"")
page.AddRows(2,True, "").AddCells12(1,"")
page.AddRowsM(1,True,0,0, "").AddCellsOS(1,6,6,6,6,6,6,"")
page.AddRows(6,True, "").AddCells12(1,"")
page.BuildGrid
Dim BotonNormal As ABMButton
BotonNormal.InitializeRaised(page, BotonNormal, "mdi-action-input", ABM.ICONALIGN_LEFT, "Ingresar", "myTheme")
BotonNormal.Size=True
BotonNormal.Enabled=True
page.Cell(14,1).AddComponent(BotonNormal)

end sub

Sub BotonNormal_Clicked(Target As String)
      Log("Testing ABMaterial")
End Sub
 

hibrid0

Active Member
Licensed User
Longtime User
Solved.
My error
B4X:
BotonNormal.InitializeRaised(page, BotonNormal, "mdi-action-input", ABM.ICONALIGN_LEFT, "Ingresar", "myTheme")

Correct:
B4X:
BotonNormal.InitializeRaised(page, "BotonNormal", "mdi-action-input", ABM.ICONALIGN_LEFT, "Ingresar", "myTheme")


Just it! Maybe I'm tired...
 
Upvote 0
Top