iOS Question Strange effect with tableview

Alessandra Pellegri

Active Member
Licensed User
Longtime User
At the start Panel3 is not visible (from UI designer)

If I do:
Code: Copy
Sub Process_Globals
...
...
  Private ListView6 As TableView
...
end sub

Private Sub Application_Start (Nav As NavigationController)
  ListView6.Initialize("ListView6", False)
  Panel3.AddView(ListView6, 0, 0, 100%x, 100%y)
end Sub
...
...
during resize:

  Panel3.Width=Panel1.Width   'Addizionali
     Label2.Top=0
     Label2.Left=0
     Label2.Width=Panel3.Width
       ListView6.AddSingleLine("rrrrrrrrrr")
       ListView6.AddSingleLine("aaaaa")
       ListView6.AddSingleLine("fffffffff")
     ListView6.Left=0
     ListView6.Top=Label2.Height
     ListView6.Width=Panel3.Width
     ListView6.Height=Panel3.Height

When I set Panel3.Visible = true and Panel3.Bringtofront I correctly see:
Code: Copy
   rrrrrrrrrr
   aaaaa
   fffffffff

If I do:
Code: Copy
  Panel3.Width=Panel1.Width   'Addizionali
     Label2.Top=0
     Label2.Left=0
     Label2.Width=Panel3.Width
     ListView6.Left=0
     ListView6.Top=Label2.Height
       ListView6.AddSingleLine("rrrrrrrrrr")
       ListView6.AddSingleLine("aaaaa")
       ListView6.AddSingleLine("fffffffff")
     ListView6.Width=Panel3.Width
     ListView6.Height=Panel3.Height

I still have correct result. But I f I do:
Code: Copy
  Panel3.Width=Panel1.Width   'Addizionali
     Label2.Top=0
     Label2.Left=0
     Label2.Width=Panel3.Width
     ListView6.Left=0
     ListView6.Top=Label2.Height
     ListView6.Width=Panel3.Width
       ListView6.AddSingleLine("rrrrrrrrrr")
       ListView6.AddSingleLine("aaaaa")
       ListView6.AddSingleLine("fffffffff")
     ListView6.Height=Panel3.Height

Listview6 remain empty. What could be ?

Thank you
 
I simplified at maximum the problem creating the attached basic project.

You can simply try (not working):
Code: Copy
Private Sub Page1_Resize(Width As Int, Height As Int)
     ListView6.Left=0
     ListView6.Top=Label2.Height
     ListView6.Width=Panel3.Width
     ListView6.Height=Panel3.Height
     ListView6.AddSingleLine("rrrrrrrrrrrrrr")
End Sub

or this (works):

Code: Copy
Private Sub Page1_Resize(Width As Int, Height As Int)
     ListView6.AddSingleLine("rrrrrrrrrrrrrr")
     ListView6.Left=0
     ListView6.Top=Label2.Height
     ListView6.Width=Panel3.Width
     ListView6.Height=Panel3.Height
End Sub
 

Attachments

Upvote 0
Add this at the end:

ListView6.Reloadall

otherwise it looks like your changes may not be displayed until you rotate the device.
 
Upvote 0
Back
Top