Wish [B4X] Forms Builder - Buttons

Alexander Stolte

Well-Known Member
Licensed User
I wanted to realize the following:
Open the Dialog with buttons:
change post
delete post
create post

quick actions, but i see the preference dialog is just for input or set something
 

jimmyF

Active Member
Licensed User
I do this in a Short Options cell click event in the B4XTable:

B4X:
Dim DataD As Map = CreateMap()
Dim column As B4XTableColumn = B4XTable1.GetColumn(ColumnId)
Dim value As String = B4XTable1.GetRow(RowId).Get(ColumnId)
Prefdlg.Initialize(Base, "Type", 300dip, 60dip)
Prefdlg.Title = "New Type"
        Prefdlg.AddShortOptionsItem("Type","",Array("Delivery","Pickup","Refund"))
Prefdlg.ItemsBackgroundColor  = xui.Color_White
Prefdlg.TextColor = xui.Color_Black
Prefdlg.Theme = PrefDialog.THEME_LIGHT
Prefdlg.Dialog.PutAtTop = True
DataD.Put("Type", cell)
Wait For (Prefdlg.ShowDialog(DataD, "OK", "CANCEL")) Complete (Result As Int)
        If Result = xui.DialogResponse_Positive Then
            Dim ans As String =  DataD.Get("Type")
            'xui.MsgboxAsync(ans,DataD.Get("Type"))
            B4XTable1.sql1.ExecNonQuery2($"UPDATE data SET ${column.SQLID} = ? WHERE rowid = ?"$, Array As String(ans, RowId))
           
        End If
Could you maybe adapt that to handle your case?

-j
 
Top