PDA

View Full Version : Frame / state change



gjniewenhuijse
October 14th, 2007, 11:42 AM
Hello, i try to develop a simple form, but i can't get it to work, can anyone help me?

I have:
- 2 buttons, button b1 en button b2
- 2 frames, frame f1 en f2 (frame f1 is default visible, frame f2 has the hidden state)

How can i:
- hide frame f1 and show frame f2 when i press button b2

and after that of course:
- hide frame f2 and show frame f1 when i press button b1

Anyone a solution or another way to solve this?

tmorten
October 15th, 2007, 03:01 PM
Create two states for each frame, linked to a variable.

F1
visibile state - variable = 0
hidden state - variable = 1

F2
hidden state - variable = 0
visible state - variable = 1

B1
NR variable action - set variable to 0

B2
NR variable action - set variable to 1

That should do the trick...

Cheers,
Tim

gjniewenhuijse
October 16th, 2007, 01:52 AM
Create two states for each frame, linked to a variable.

F1
visibile state - variable = 0
hidden state - variable = 1

F2
hidden state - variable = 0
visible state - variable = 1

B1
NR variable action - set variable to 0

B2
NR variable action - set variable to 1

That should do the trick...

Cheers,
Tim


I know, but how to code this?

tmorten
October 16th, 2007, 02:21 PM
You can set up frame states and assign variable actions to buttons in NetRemote Designer without writing any code... there is a drop-down in Designer's GUI that will allow you to specify what variable each frame state is dependent on, and similarly there is an action to set a variable to a value that can be assigned to any button.

Are you wanting to do all this from LUA rather than use the Designer interface?

Best,
Tim