Hilited Tab in Tab Menu

LiveCode is the premier environment for creating multi-platform solutions for all major operating systems - Windows, Mac OS X, Linux, the Web, Server environments and Mobile platforms. Brand new to LiveCode? Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
deeverd
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 165
Joined: Mon Jul 16, 2007 11:58 pm
Location: Las Vegas, NV

Hilited Tab in Tab Menu

Post by deeverd » Sun Mar 26, 2017 10:58 pm

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.

jmburnod
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 2718
Joined: Sat Dec 22, 2007 5:35 pm
Location: Genève
Contact:

Re: Hilited Tab in Tab Menu

Post by jmburnod » Sun Mar 26, 2017 11:27 pm

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
Last edited by jmburnod on Mon Mar 27, 2017 10:12 am, edited 1 time in total.
https://alternatic.ch

deeverd
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 165
Joined: Mon Jul 16, 2007 11:58 pm
Location: Las Vegas, NV

Re: Hilited Tab in Tab Menu

Post by deeverd » Mon Mar 27, 2017 12:22 am

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

Post Reply

Return to “Getting Started with LiveCode - Experienced Developers”