Android Question B4XPreferencesDialog field title

Discussion in 'Android Questions' started by HAH, Jun 24, 2019.

  1. HAH

    HAH Active Member Licensed User

    Hi
    How to change runtime/programmatically the field title that come from B4XPreferencesDialog.loadfromjson fields?
     
  2. Erel

    Erel Administrator Staff Member Licensed User

    Log all titles:
    Code:
    For Each pi As B4XPrefItem In p.PrefItems
       
    Log(pi.Title)
    Next
    Change the title of the second item:
    Code:
    Dim pi As B4XPrefItem = p.PrefItems.Get(1)
    pi.Title = 
    "new title"
    p.CustomListView1.Clear 
    'required to force the layout to be recreated
     
    HAH likes this.
  3. jimmyF

    jimmyF Active Member Licensed User

    What is p?
     
  4. Erel

    Erel Administrator Staff Member Licensed User

    This is the B4XPreferencesDialog object.
     
    jimmyF likes this.
  5. jimmyF

    jimmyF Active Member Licensed User

    So, why not, in the Table click event for example, do this:

    Code:
    Dim column As B4XTableColumn = B4XTable1.GetColumn(ColumnId)
    Log(column.Title)
    column.Title = 
    "New Title"
    Log(column.Title)
    PrefDialog.CustomListView1.Clear 
    'required to force the layout to be recreated
    EDIT: It doesn't change anything, so, why can we not change Title Property this way?

    -j
     
  6. Erel

    Erel Administrator Staff Member Licensed User

    There is no relation between B4XTable and B4XPreferenceDialog. I'm not sure that I understand your question. It is better if you start a new thread.
     
  7. jimmyF

    jimmyF Active Member Licensed User

    No, of course not. :confused:

    Please disregard! o_O
     
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