Hi Folks,
I have had no problems adding a group of chips to an ArrayComponent, however, when I try Floating buttons it doe not seem to work. So I added some components to a Container on a page namely, 6 buttons and 4 chips, code follows:
The code in the program does not have the numbers in descending order, somehow copy and paste did that!
The ABMShared code is as follows:
The event returned by Page_ParseEvent is as follows:
in the case of the chips - "myactionchip_clicked" (this is fine)
in the case of the buttons - "62_clicked" (here it is returning the button id and not the array name)
Needless to say I am somewhat puzzled, unless of course I am doing something wrong that I cannot for the life of me see.
Any ideas please.
Hilton.
I have had no problems adding a group of chips to an ArrayComponent, however, when I try Floating buttons it doe not seem to work. So I added some components to a Container on a page namely, 6 buttons and 4 chips, code follows:
The code in the program does not have the numbers in descending order, somehow copy and paste did that!
B4X:
Dim navbtn66 As ABMButton
Dim navbtn65 As ABMButton
Dim navbtn64 As ABMButton
Dim navbtn63 As ABMButton
Dim navbtn62 As ABMButton
Dim navbtn61 As ABMButton
navbtn66 = ABMShared.buildButtons(page,"66","mdi-file-file-download","btnupdn")
navbtn65 = ABMShared.buildButtons(page,"65","mdi-file-file-upload","btnupdn")
navbtn64 = ABMShared.buildButtons(page,"64","mdi-av-skip-next","")
navbtn63 = ABMShared.buildButtons(page,"63","mdi-image-navigate-next","")
navbtn62 = ABMShared.buildButtons(page,"62","mdi-image-navigate-before","")
navbtn61 = ABMShared.buildButtons(page,"61","mdi-av-skip-previous","")
tab1cont.Cell(2,1).AddArrayComponent(navbtn66,"navbtn")
tab1cont.Cell(2,1).AddArrayComponent(navbtn65,"navbtn")
tab1cont.Cell(2,1).AddArrayComponent(navbtn64,"navbtn")
tab1cont.Cell(2,1).AddArrayComponent(navbtn63,"navbtn")
tab1cont.Cell(2,1).AddArrayComponent(navbtn62,"navbtn")
tab1cont.Cell(2,1).AddArrayComponent(navbtn61,"navbtn")
Dim myactionchip53 As ABMChip 'clr
Dim myactionchip52 As ABMChip 'del
Dim myactionchip51 As ABMChip 'edit
Dim myactionchip50 As ABMChip 'add 'action chips
myactionchip53 = ABMShared.buildChips(page,"53",ABMShared.getSpaces(1) & "Clear" & ABMShared.getSpaces(1),False)
myactionchip53.UseTheme("chipwhite")
myactionchip52 = ABMShared.buildChips(page,"52","Delete",False)
myactionchip52.UseTheme("chipred")
myactionchip51 = ABMShared.buildChips(page,"51",ABMShared.getSpaces(1) & "Edit" & ABMShared.getSpaces(2),False)
myactionchip51.UseTheme("chipblue")
myactionchip50 = ABMShared.buildChips(page,"50",ABMShared.getSpaces(2) & "Add" & ABMShared.getSpaces(2),False)
myactionchip50.UseTheme("chipgreen")
tab1cont.Cell(2,1).AddArrayComponent(myactionchip53,"myactionchip")
tab1cont.Cell(2,1).AddArrayComponent(myactionchip52,"myactionchip")
tab1cont.Cell(2,1).AddArrayComponent(myactionchip51,"myactionchip")
tab1cont.Cell(2,1).AddArrayComponent(myactionchip50,"myactionchip")
The ABMShared code is as follows:
B4X:
sub buildChips(page As ABMPage,id As String,text As String,canclose As Boolean) As ABMChip
Dim ch As ABMChipSub
ch.Initialize(page,id,text,canclose,"")
return ch
end sub
sub buildButtons(page As ABMPage,id As String,icon As String,theme As String) As ABMButton
Dim btn As ABMButton
btn.InitializeFloating(page,id,icon,theme)
Return btn
End Sub
The event returned by Page_ParseEvent is as follows:
in the case of the chips - "myactionchip_clicked" (this is fine)
in the case of the buttons - "62_clicked" (here it is returning the button id and not the array name)
Needless to say I am somewhat puzzled, unless of course I am doing something wrong that I cannot for the life of me see.
Any ideas please.
Hilton.