Android Question B4XTable & TabStrip

Discussion in 'Android Questions' started by wyatt420, Jun 3, 2019.

  1. wyatt420

    wyatt420 Member Licensed User

    Hi, I am just trying to get my head around TabView and b4xtable.
    How would you load a B4XTable into a second page.

    I have attached a file with B4XTable&Forms and TabStripViewPager
    link: (removed)
    How would i get it to have the ability to "add" to table on page 1.
    and view b4xtable on page 2?

    thanks
     
    Last edited: Jun 3, 2019
  2. Erel

    Erel Administrator Staff Member Licensed User

    Use File - Export as zip to create a zip file with the required files. You can then upload it directly to the forum.
     
  3. wyatt420

    wyatt420 Member Licensed User

    ah yes, that is much smaller. thank you
     

    Attached Files:

  4. Erel

    Erel Administrator Staff Member Licensed User

    It doesn't matter where the table is located. Just declare it in Sub Globals and you can then access it:
    Code:
    Private B4XTable1 As B4XTable
    The code that adds rows is in EditableTable.ShowDialog. You can do something similar without the dialog.
     
  5. wyatt420

    wyatt420 Member Licensed User

    thank you. from my attached example, if i declared Private B4XTable1 As B4XTable in Main, would i need to call Main.B4XTable1 from in the EditableTable class?

    or would it be better to have 1 Page with panels and just hide layers to mimic page activity (eg Page 1, B4xTable, Page3-CLV)?
    sorry, I do not understand how to contain the B4XTable into just the 1 page.
     
  6. Erel

    Erel Administrator Staff Member Licensed User

    If you want to use EditableTable class then add a panel to page 2 and then call EditableTable.Initialize(ThisPanel).
     
  7. wyatt420

    wyatt420 Member Licensed User

    Thanks Erel, I have added and declared the PanelTable in Main.
    The B4XTable is created twice on page 2. Once in the Panel and once on the page outside of the panel.

    How do i remove the second b4xtable ?
     

    Attached Files:

  8. wyatt420

    wyatt420 Member Licensed User

    i removed the double up by removing the view and loading it again.

    Code:
    Parent.RemoveAllViews
    Parent.LoadLayout(
    "page2")
     

    Attached Files:

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