You are viewing an old version of this page. View the current version.
Compare with Current View Page History
« Previous Version 7 Current »
The code widget allows for displaying of pre-formatted text that is typically associated with source code.
Optionally, a label can be included and is specified using a key to a lang file entry. Visibility bindings are also supported.
<code> <visible function="showCodeSnippet"/> <binding variable="question"> <attribute name="codeSnippet"/> </binding> </code>
unit QuestionManagement; Question question; void initQuestion() { question = getCurrentQuestion(); } bool showCodeSnippet() { if(question.codeSnippet == null) { return false; } return true; } . . .
<code label="info.code_example"> <visible function="showCodeSnippet"/> <binding variable="question"> <attribute name="codeSnippet"/> </binding> </code>
info.code_example = Code example:
Add Comment
Add Comment