Wish [B4X] Forms Builder - Buttons

Discussion in 'Bugs & wishlist' started by Alexander Stolte, May 22, 2019.

  1. Alexander Stolte

    Alexander Stolte Well-Known Member Licensed User

    Hey,

    i was using this tool on a simple app and it was not possible to add simple buttons, I would find it useful.

    Greetings
     
  2. Erel

    Erel Administrator Staff Member Licensed User

    Not sure that I understand. What will the buttons do? How will the buttons affect the input form?
     
  3. Alexander Stolte

    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
     
  4. Erel

    Erel Administrator Staff Member Licensed User

    That's correct. B4XPreferencesDialog with its Forms Builder companion tool are intended for building input forms.
     
  5. jimmyF

    jimmyF Active Member Licensed User

    I do this in a Short Options cell click event in the B4XTable:

    Code:
    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"300dip60dip)
    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
     
    Erel likes this.
Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice