Page 1 of 1

Hilited Tab in Tab Menu

Posted: Sun Mar 26, 2017 10:58 pm
by deeverd
Hello Forum,

I just started using the Tab Menu, which I like, but I have only one problem I can't seem to overcome with it.

When I use one of the tabs on the "Home" page to go to a substack and then later return, the tab remains hilited for the substack.

I have tried a bunch of commands such as the following to get the "Home" tab to be hilited on the return:

Code: Select all

set the hilited button "Home" of button "Tab Menu" to true
Basically, I've tried to do something similar to how I treat radio buttons, though this might not be the correct approach.

I have also tried sending a mouseUp to the Home tab upon returning to that card, but still have not gotten it to work.

I'm using version 8.13 of LiveCode.

Any suggestions would definitely be appreciated.

Re: Hilited Tab in Tab Menu

Posted: Sun Mar 26, 2017 11:27 pm
by jmburnod
Hi deeverd,
menuhistory should be useful
something like that:

Code: Select all

set the menuhistory of btn "tab menu" to lineoffset("home", the text of btn "tab Menu")
Best regards
Jean-Marc

Re: Hilited Tab in Tab Menu

Posted: Mon Mar 27, 2017 12:22 am
by deeverd
Thanks Jean-Marc,

Awesome, I just tested out that code and it worked like a charm! Much better than my idea of sending a mouseUp, since it doesn't activate any other script and waste time processing.

Cheers,
deeverd