Hi guys,
I am planning to access the individual image of the ‘newTabBar’ widget. Reason for doing this, is so that I can resize, animate, move (if possible).
Is this possible, as I don’t see a way to access them.
Thanks
Hi guys,
I am planning to access the individual image of the ‘newTabBar’ widget. Reason for doing this, is so that I can resize, animate, move (if possible).
Is this possible, as I don’t see a way to access them.
Thanks
I don’t believe that we have that facility exposed. This is not a feature that would normally be used. I would recommend checking out the source on our github repository and look at the code for the tabBar and see if you can implement the feature in a local copy of the widgets. Being able to extend widgets for edge cases like this is one reason why we made the widgets code open source.
Rob
Thanks Rob. For those looking for it, it is here :
Github code : https://github.com/coronalabs/framework-widgets-legacy/blob/master/widgetLibrary/widget_tabbar.lua
To access some items in the ‘tabbar’ (widget 2.0) :
Text Label : tabbar._viewButtons[i].label.text (e.g. tabbar._viewButtons[2].label.text = “Label 2” )
x-position : tabbar._viewButtons[i].x (e.g. tabbar._viewButtons[2].x )
Just keep in mind when you see an underscore at the beginning of a variable name like _viewButtons[], those are intended to be private variables and we could change them at any time.
Rob
I don’t believe that we have that facility exposed. This is not a feature that would normally be used. I would recommend checking out the source on our github repository and look at the code for the tabBar and see if you can implement the feature in a local copy of the widgets. Being able to extend widgets for edge cases like this is one reason why we made the widgets code open source.
Rob
Thanks Rob. For those looking for it, it is here :
Github code : https://github.com/coronalabs/framework-widgets-legacy/blob/master/widgetLibrary/widget_tabbar.lua
To access some items in the ‘tabbar’ (widget 2.0) :
Text Label : tabbar._viewButtons[i].label.text (e.g. tabbar._viewButtons[2].label.text = “Label 2” )
x-position : tabbar._viewButtons[i].x (e.g. tabbar._viewButtons[2].x )
Just keep in mind when you see an underscore at the beginning of a variable name like _viewButtons[], those are intended to be private variables and we could change them at any time.
Rob
This was helpful, I needed to change the position of my icons. If you want to change the position of the icon of the selected tab, you can access it via this:
x-position : tabbar._viewButtons[i]._over.x
This was helpful, I needed to change the position of my icons. If you want to change the position of the icon of the selected tab, you can access it via this:
x-position : tabbar._viewButtons[i]._over.x