Setting focus of iOS tab

This is the place to discuss anything relating to MobGUI

Moderators: heatherlaine, kevinmiller, robinmiller, malte, splash21

Post Reply
jimmuell
Posts: 1
Joined: Sun Apr 20, 2014 11:05 pm

Setting focus of iOS tab

Post by jimmuell » Mon Apr 21, 2014 5:17 am

I need help in setting the tab focus and or selection of the first tab of four in a iPhone app using a tab bar when it starts up. The 4 buttons are in a group called group 1 and the name of the first tab is named option1. I am using the example provided in the short mobgui tutorial.

LCNeil
Livecode Staff Member
Livecode Staff Member
Posts: 1223
Joined: Wed Oct 03, 2012 4:07 pm

Re: Setting focus of iOS tab

Post by LCNeil » Tue Apr 22, 2014 12:00 pm

Hi Jimmuell,

As your questiong is about mobGui, I've moved your topic to the more relevant mobGui forum.

As far as I'm aware, there is no direct mobGui option to set the selection of a tab in your group but what you can do is send messages to the relevant button (group) to force a selection.

You will be able to send a mouseDown message to the button of your choice to visually select it. Something like the following on your card script should do the trick-

Code: Select all

on openCard
send mouseDown to group "IconButton-1003"
end openCard
replacing group "IconButton-1003" with the name of your mob gui button group that you want to have focus.

Kind Regards,


Neil Roger
--
RunRev Support Team ~ http://www.runrev.com
——

Post Reply

Return to “MobGUI”