| wizard tmpPane1 tmpPane2 tmpPane3 |
wizard := WizardControl new.
wizard renderer: MerlinMorphicWizardRenderer new.
tmpPane1 := ( WizardFirstPane new
row: ( RadioButtonsPart new
inGroupboxNamed: 'Choose Option A';
options: { #'Option 1'. #'Option 2' };
defaultValue: nil;
callback: [:value :tmpPart |
(value = #'Option 2') ifTrue: [
wizard selectBranch: 2.
]
ifFalse: [
wizard selectBranch: 1.
]
];
yourself )
associatedTo: #optionA
).
tmpPane2 :=( WizardLastPane new
row: ( ListPart new
initialList: { 1 . 2 . 3 . 4 };
yourself )
associatedTo: #optionB
).
tmpPane3 := ( WizardLastPane new
row: ( RadioButtonsPart new
inGroupboxNamed: 'Choose Option B';
options: { #'Option 3'. #'Option 4' };
defaultValue: nil;
yourself )
associatedTo: #optionB
).
wizard addPane: tmpPane1.
wizard addPane: tmpPane2 .
wizard addBranch.
wizard selectBranch: 2.
wizard addPane: tmpPane1.
wizard addPane: tmpPane3 .
wizard selectBranch: 1.
wizard open.
You can also look at the class MerlinExamples, there is several examples in the class side.