iOS Question How do I add a Header Section to TableView

Discussion in 'iOS Questions' started by davepamn, Mar 13, 2015.

  1. davepamn

    davepamn Active Member Licensed User

    I want to add a group Header section to a segment of tableview rows.

    Code:
    Private tvContracts As TableView
    Page2.RootPanel.AddView(tvContracts,
    0,300,100%x,70%y)
    ...
          
    If sOldContractNumber<>sContractNumber Then
               
                tvContracts.AddSection(sContractNumber,
    "")

            
    End If

            
    Dim tc As TableCell=tvContracts.AddSingleLine(sFieldNumber)

            tc.IndentationLevel=
    2
            
    Dim oDetailText As AttributedString
            oDetailText.Initialize(sFieldNumber,
    Font.CreateNew(30),Colors.Blue)
            tc.DetailText=oDetailText
            tc.Tag=sID
            sOldContractNumber=sContractNumber
    ...

    tvContracts.ReloadAll
    Each Contract Should be a Header Section that the user can not select.

    I want each of the contract numbers to be a section.

    Contract 1 (Section)
    Field 2 (Two Line)
    Field 3 (Two Line)

    The font size does not work when I call reloadall. Am I suppose to change the font size while the table rows are loading through an event?
     
    Last edited: Mar 16, 2015
  2. davepamn

    davepamn Active Member Licensed User

    How do I change the font size and color of the sections?

    The table cell Font size and color do not seem to be applying to the Single Line.

    The tag value is working.
     
    Last edited: Mar 13, 2015
  3. davepamn

    davepamn Active Member Licensed User

    Code:
    'I need the b4a equivalent api
    tvContracts.tw.TwoLinesLayout.Label.TextSize=30
    'I found rowHeight
        tvContracts.RowHeight=50dip
     
  4. Erel

    Erel Administrator Staff Member Licensed User

    Please start a new thread for a new question.
     
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