I have create a tabbed panel with tabs A, B, & C.
Tab A is highlighted in blue and will not respond to a click until I click one
of the other tabs.
Is there a way to be able to click the highlighted tab and have
it work the first time? or maybe a way to have none of the tabs highlighted?
The test script that I have been using with the 3 tabbed panel A, B, C, is as follows:
on menuPick theItem -- in a pulldown menu
if theItem is "A" then
beep
exit menuPick
end if
if theItem is "B" then
repeat 2 times
beep
wait 200 milliseconds
end repeat
exit menuPick
end if
if theItem is "C" then
repeat 3 times
beep
wait 200 milliseconds
end repeat
exit menuPick
end if
end menuPick
Would appreciate possible solutions,
Thanks,
Errol
Tabbed Panel Highlights
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
Re: Tabbed Panel Highlights
THe reason it doesn't work is that menuPick only fires when the chosen menu item is changed. If you click the same tab, it won't fire. If you instead switch to a mouseUp handler instead of menupick it should work fine. In fact, it does, here is the modified code.
Here is an example doing the same thing with a switch/case structure to replace the If's just to show alternate methods.
Code: Select all
on mouseUp
put menuitem (the menuhistory of me) of me into theItem
if theItem is "A" then
beep
exit mouseUp
end if
if theItem is "B" then
repeat 2 times
beep
wait 200 milliseconds
end repeat
exit mouseUp
end if
if theItem is "C" then
repeat 3 times
beep
wait 200 milliseconds
end repeat
exit mouseUp
end if
end mouseUp
Code: Select all
on mouseUp
switch menuitem (the menuhistory of me) of me
case "A"
beep
break
case "B"
repeat 2 times
beep
wait 200 milliseconds
end repeat
break
case "C"
repeat 3 times
beep
wait 200 milliseconds
end repeat
break
end switch
end mouseUp
Admatha wrote:I have create a tabbed panel with tabs A, B, & C.
Tab A is highlighted in blue and will not respond to a click until I click one
of the other tabs.
Is there a way to be able to click the highlighted tab and have
it work the first time? or maybe a way to have none of the tabs highlighted?
The test script that I have been using with the 3 tabbed panel A, B, C, is as follows:
on menuPick theItem -- in a pulldown menu
if theItem is "A" then
beep
exit menuPick
end if
if theItem is "B" then
repeat 2 times
beep
wait 200 milliseconds
end repeat
exit menuPick
end if
if theItem is "C" then
repeat 3 times
beep
wait 200 milliseconds
end repeat
exit menuPick
end if
end menuPick
Would appreciate possible solutions,
Thanks,
Errol
Re: Tabbed Panel Highlights
Fantastic! I have tested your mouseUp and it works just as you said. I am new to the Forum and am really impressed that I got the right help the first time in less than an hour.
Thank you very much,
Errol
Thank you very much,
Errol
Re: Tabbed Panel Highlights
Hi Errol,
welcome to the forum!
Please take a look at and go through (some of) these great tutorial stacks at:
http://www.runrev.com/developers/lesson ... nferences/
And of course don't hesitate to ask here
Best from germany
Klaus
welcome to the forum!
Please take a look at and go through (some of) these great tutorial stacks at:
http://www.runrev.com/developers/lesson ... nferences/
And of course don't hesitate to ask here

Best from germany
Klaus