PDA

View Full Version : a changing interface


TiSna
01-15-2010, 10:35 AM
Hello to everyone

i have a question about how to make a changing interface in a rollout.
i have created a dropdownlist in a rollout and according to the value of the item selected in this ddl, i want to have different buttons appearing below this...

Can somebedy help please?

thanks,
Remi

jkwiatkowski
01-15-2010, 12:09 PM
Hello,

addSubRollout and removeSubRollout methods would help you, also you can always simple eneble/disable controls when some state changes.

Here is the example of dynamic add/rem rollouts:




global toggle = true

rollout test "test" height:200
(
button btnToggle "toggle"
subrollout test1 "test1"


on test open do
(
AddSubRollout test.test1 test1a
test.test1.height += 100
)

on btnToggle pressed do
(
if ::toggle then
(
RemoveSubRollout test.test1 test1a
AddSubRollout test.test1 test1b
) else (
RemoveSubRollout test.test1 test1b
AddSubRollout test.test1 test1a
)
::toggle = not ::toggle
)
)

rollout test1a "test1a"
(
spinner test1as "test1as"
)

rollout test1b "test1b"
(
spinner test1bs "test1bs"
)

createdialog test




jk

TiSna
01-15-2010, 12:42 PM
thanks a lot!! exactly what i was searching to do ;)

CGTalk Moderation
01-15-2010, 12:42 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.