kommander - switch structure example


/ Published in: Other
Save to your folder(s)

This is the "populate()" function of one script object.
First, connect the "selectionChanged()" signal (of ListBox1) with "populate()" slot (of this script object)


Copy this code and paste it in your HTML
  1. @switch( @ListBox1.selection() )
  2. @case(string1)
  3. @Label1.SetText( string1 )
  4. @case(string2)
  5. @Label1.SetText( string2 )
  6. @case(string3)
  7. @Label1.SetText( string3 )
  8. @case(string4)
  9. @Label1.SetText( string4 )
  10. @case(string5)
  11. @Label1.SetText( string5 )
  12. @end

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.