Sliding Tabs (Custom Control) - Using Gideros

A while ago, I had a custom control for a lua based framework, now it is time to test the last article. The best proof would be to create a custom control that one could use. As I mentioned in that article, this can present a wonderful opportunity to distribute apps as a Demo version rather than the release version. If you like it, you can purchase the mobile version for use. So, here goes

Here is a sliding tab control that you can use to have multiple tabs in your app, a video of the same can be viewed here

This has been now made for Gideros and you can download the attached zip file which contains the project. The graphics are contained and were made specifically for the 320x480 version, so if you run this on a larger screen, you might need to resize the graphics for larger screen sizes. The control is rather simple to use. Most of the settings can be changed by code.

here's a sampler of the main.lua that allows you to use the control


local l

local function onTabs(event)
   if"button" then 
      local theTab = l:getTab(
         if theTab.showing==true then 
            print(,, event.button)
      print(,, event.lastTab)

 l = createSlider()     --create the tab control
 l:setHandler(onTabs)   --set the function that shall handle the touches
 l:setButtonWidth(32)   --set the width of the tab header button
 l:setItemWidth(64)     --set the width of the items on the TabBar
 l:setMaxTabs(5)        --set the max number of bars that you want to have
 l:setFileType(".png")  --set the default file type (this shall load images accordingly)
 --Create a couple of tabs
--Add a button to the tab #1
--Add buttons to tab #2, but note that the buttons are added as specific images
--adding buttons to tab#3 and again specific images
--Position the tabbar to the lower bottom of the screen

This will definitely run on a Mac running GiderosStudio, I am not sure about this running on Windows, I hope that it will, but no guarantees.

you can download the project with the zipped file from You may not distribute or sell the Graphics or the code which is provided to you in this package for testing only. You may not use it in your projects without purchasing a license to the same.

If you like it and would like to use it in your projects, you may purchase it for $15 AUD, and you can receive the project ready to be incorporated into your own deployment project.

NOTE: This will not work for any other lua framework other than Gideros.


Popular Posts