iOS Question Tableview customazation

Adilson Jacinto

Active Member
Licensed User
Longtime User
Hi @Erel I am trying to customize my TableView, for example to start I tried to change the background color but it didn't work, so after JobDone function it loses it for some reason.

Also in TableView_SelectedChanged (SectionIndex As Int, Cell As TableCell) how do I only get the header value instead of Cell.Text.ToString, I know that works for both heard and the cell but just want the header value.

And also How can I make the rows line higher so the Icon does not go over the line in the row?

Please have a look at my project.

Thanks
 

Attachments

  • myproject.zip
    336.3 KB · Views: 173

Erel

B4X founder
Staff member
Licensed User
Longtime User
This is a community forum, please do not limit your questions to a single member.
I cannot run your project as it depends on an external server.

The only way to change the background color is by using custom items: https://www.b4x.com/android/forum/threads/tableview-cell-background-color.51827/#content

Also in TableView_SelectedChanged (SectionIndex As Int, Cell As TableCell) how do I only get the header value instead of Cell.Text.ToString, I know that works for both heard and the cell but just want the header value.
Not sure what you mean with the header value. Cell.DetailText will return the second line.
You can always use the Tag property to store any value you like.
And also How can I make the rows line higher so the Icon does not go over the line in the row?
Change TableView.RowHeight
 
Upvote 0

Adilson Jacinto

Active Member
Licensed User
Longtime User
This is a community forum, please do not limit your questions to a single member.
I cannot run your project as it depends on an external server.

The only way to change the background color is by using custom items: https://www.b4x.com/android/forum/threads/tableview-cell-background-color.51827/#content


Not sure what you mean with the header value. Cell.DetailText will return the second line.
You can always use the Tag property to store any value you like.

Change TableView.RowHeight

Thanks, what about having the TableView just below the Textfield?
 
Upvote 0

Adilson Jacinto

Active Member
Licensed User
Longtime User
Which TextField?

Please upload a small project with the layout that you are trying to create. Note that you should use File - Export as zip to build the zip file.
Hi I have got the project attached here, I used one of your projects and edited so you can see what I mean. Basically the in the designer I have a Label and a TextField then when the application ruin it will populate the Tableview with some values and I want to have that table below the TextField but still at 100% height., please see project.

Thanks
 

Attachments

  • projexample.zip
    3.6 KB · Views: 166
Upvote 0

klaus

Expert
Licensed User
Longtime User
Is this what you are lookink for ?
B4X:
Private Sub Page1_Resize(Width As Int, Height As Int)
    Dim Top, Space As Float
    Space = 10
    Top = TextField1.Top + TextField1.Height + Space
    tv.SetLayoutAnimated(400, 0.5, 0, Top, 100%x, 100%y - Top - Space)
End Sub
 
Upvote 0

Adilson Jacinto

Active Member
Licensed User
Longtime User
Is this what you are lookink for ?
B4X:
Private Sub Page1_Resize(Width As Int, Height As Int)
    Dim Top, Space As Float
    Space = 10
    Top = TextField1.Top + TextField1.Height + Space
    tv.SetLayoutAnimated(400, 0.5, 0, Top, 100%x, 100%y - Top - Space)
End Sub

Yes it was thank you very much
 
Upvote 0
Top