iOS Question Tbc TabBarControl , Frame

MList

Active Member
Licensed User
Is there a posibility to make a frame around the TabbarControl,
or around the TabBarControl Items ?
Thanks a lot
Marion
 

Semen Matusovskiy

Well-Known Member
Licensed User
Lines from all sides looks enough strange on iPhone X +.
Typically there is a top line only.

To make this line you can retrieve tabBar and to set shadowImage property.
Looks simple, but you need to creare a image (not very comfortable).

IMO, more simple is to add a subview. For example:
B4X:
   Dim noTabControl As NativeObject = TabControl
    Dim noTabBar As NativeObject = noTabControl.GetField ("tabBar")
    Dim View As View = noTabBar    
    Dim Panel As Panel
    Panel.Initialize ("")
    Panel.Width = View.Width
    Panel.Height = 1
    Panel.Color = Colors.Red    
    noTabBar.RunMethod ("addSubview:", Array (Panel))
 
Upvote 0

MList

Active Member
Licensed User
Thanks a lot.
So now i have got a line over the tab bar, that looks ok?
Is there a possibility to get a frame around each of the tbc page items?
 
Upvote 0

Semen Matusovskiy

Well-Known Member
Licensed User
TabBarItems are subviews of tabBar. For example, after first two lines of my sample add following
B4X:
    Dim l As List = noTabBar.GetField ("subviews")
    For Each view As View In l
        view.SetBorder (1, Colors.Green, 0)
    Next
You will see green borders, but I don't think that this is nice. Do you have a picture with desired design ?
 
Upvote 0

MList

Active Member
Licensed User
Thanks again, changes it to white, thats how it looks now. Is it possible to makt the corners roundes like the above buttons ?
 

Attachments

  • 2021-03-15 16.18.15.jpg
    2021-03-15 16.18.15.jpg
    52.3 KB · Views: 242
Upvote 0
Top