Simple Tabbar Without Images

Is that possible to create simple tab bar that only displays the label field?

From the doc it seems possible as the defaultFile property is optional, but it turns out the image file is mandatory:

“ERROR: widget.newTabBar: tab button default file expected, got nil(null)”

Sometimes it is handy to have a simple plain tab bar just for displaying short text message, anyone could give me a hand?

Jimmy 

Is that possible to create simple tab bar that only displays the label field?

From the doc it seems possible as the defaultFile property is optional, but it turns out the image file is mandatory:

“ERROR: widget.newTabBar: tab button default file expected, got nil(null)”

Sometimes it is handy to have a simple plain tab bar just for displaying short text message, anyone could give me a hand?

Jimmy 

We won’t be supporting the old widget v1 style of creating tabBar’s with no buttons. If you want to create a bar for displaying messages I recommend you use graphics.newGradient with a display.newRect. 

That being said, we may add navigation bars to the widget library in the future, but a tab bar is for creating a tab bar only.

Thanks

 Wow thanks for your prompt reply!  :smiley:

Showing information in different tabs is clean and elegant, it would be great if the widget library can support creation of a image-less tab bar in the future.

For the approach you suggested (graphics.newGradient with a display.newRect), could you please show me some examples? I am fairly new to Corona and your kindness help would be much appreciated.

Cheers,

Jimmy

Sure, if you take a look at the sample code which ships with the sdk, SampleCode > Interface > WidgetDemo 

You will see it has a title bar at the top created via the steps I mentioned above :slight_smile:

Thanks mate, finally I use SegmentedControl and could achieve the same purpose.  :rolleyes:

Jimmy

Is that possible to create simple tab bar that only displays the label field?

From the doc it seems possible as the defaultFile property is optional, but it turns out the image file is mandatory:

“ERROR: widget.newTabBar: tab button default file expected, got nil(null)”

Sometimes it is handy to have a simple plain tab bar just for displaying short text message, anyone could give me a hand?

Jimmy 

We won’t be supporting the old widget v1 style of creating tabBar’s with no buttons. If you want to create a bar for displaying messages I recommend you use graphics.newGradient with a display.newRect. 

That being said, we may add navigation bars to the widget library in the future, but a tab bar is for creating a tab bar only.

Thanks

 Wow thanks for your prompt reply!  :smiley:

Showing information in different tabs is clean and elegant, it would be great if the widget library can support creation of a image-less tab bar in the future.

For the approach you suggested (graphics.newGradient with a display.newRect), could you please show me some examples? I am fairly new to Corona and your kindness help would be much appreciated.

Cheers,

Jimmy

Sure, if you take a look at the sample code which ships with the sdk, SampleCode > Interface > WidgetDemo 

You will see it has a title bar at the top created via the steps I mentioned above :slight_smile:

Thanks mate, finally I use SegmentedControl and could achieve the same purpose.  :rolleyes:

Jimmy