Page 1 of 1

forward/back buttons

Posted: Tue Aug 31, 2010 4:33 pm
by Scott Richardson
I have a stack of a dozen cards or so that the user navigates through by clicking "forward" and "back" buttons (on the card in a separate sub-stack). What is the most efficient way to disable the forward button in the sub-stack when the user reaches the last card in the main stack (and disable the back button when the user is at the first card)? As it is now, if the user is at the beginning and clicks "back" it takes him to the last card in the main stack. Instead, it would be good if the button "greyed out" or triggered a beep, but didn't go to the last card. I'm sure there is some good way to do this with the if-then structure, but I am not sure how to approach it. I would appreciate any suggestions — you guys are always a great help.

Scott

Re: forward/back buttons

Posted: Tue Aug 31, 2010 4:40 pm
by Klaus
Hi Scott,

use an close-/opencard handler in the first/last card!

Like this for the last card:

Code: Select all

on opencard
  disable btn "next" of cd N of stack "you navi stack here"
  ## or wherever you button resides
end opencard

on closecard
  enable btn "next" of cd N of stack "you navi stack here"
  ## or wwerever you button resides
end opencard
Same for the first card accordingly. You get the picture :D


Best

Klaus

Re: forward/back buttons

Posted: Tue Aug 31, 2010 7:16 pm
by Scott Richardson
Thanks Klaus! I was thinking from the wrong direction. I hadn't been thinking of scripting the card at all, just the button. Your idea is very efficient. I have already adapted it to my test stack and will soon use it on the real thing.
Thanks so much.
Scott