Wish B4XTable1 - Visible property

peacemaker

Expert
Licensed User
Longtime User
B4X:
Public Sub getVisible As Boolean
    Return mBase.Visible
End Sub

Public Sub setVisible (NewVisibility As Boolean)
    mBase.Visible = NewVisibility
End Sub

Let's add everywhere
 

aeric

Expert
Licensed User
Longtime User
I am not sure if it is a bug.
It doesn't matter if I set the Visible (Common Properties) value to True or False, it will be Visible when the app starts. I only tested in B4J.

We need to set the Visible to False by code in B4XPage_Created.
B4X:
Private Sub B4XPage_Created (Root1 As B4XView)
    Root = Root1
    Root.LoadLayout("MainPage")
    B4XTable1.AddColumn("Sample", B4XTable1.COLUMN_TYPE_TEXT)
    B4XTable1.Visible = False ' setting in Designer has no effect
    'Pane1.Visible = False
End Sub
 

Attachments

  • B4XTableVisible.b4xlib
    14.3 KB · Views: 65
  • Example2.zip
    9.2 KB · Views: 84

LucaMs

Expert
Licensed User
Longtime User
It's not a bug. Not all properties common to all views affect custom views.
 

aeric

Expert
Licensed User
Longtime User
It's not a bug. Not all properties common to all views affect custom views.
The expected behavior is when we uncheck the value in Designer, it should not shown in the UI.
If we use the original library provided by Erel, the view is still showing even though we have set mBase.Visible = False in B4XPage_Created.
 

LucaMs

Expert
Licensed User
Longtime User
You should use:

mBase.Visible = Lbl.Visible
 
Cookies are required to use this site. You must accept them to continue using the site. Learn more…