Changes the current Theme to the one specified in run-time. It returns 1 (one) if the Theme could be changed. Otherwise, it returns a 0 (zero) value.
SetTheme(ThemeObjectName)
Where:
the ThemeObjectName string is the name (not description) of a Theme in your Knowledge Base.
If the specified Theme is not found, no Theme change is performed and the current Theme remains as if the method was not executed. Once the SetTheme function has been successful, the Theme setting remains active for the rest of the session. In Web applications, it means that GeneXus code automatically saves the value of the current Theme in the current session.
Objects:Web Panel
Generators: .NET,.NET Framework,Java
Event &MyTheme.Click
If SetTheme(&MyTheme)<>0
...
EndIf
EndEvent
Event 'Orange'
&NumVar = SetTheme(!'Orange') // Set the web page with the Orange theme inmediately.
EndEvent
Take into account the "!" symbol before the theme name for translation reasons. (For further information see Application Localization).
GetTheme function