Official Content

Changes the application Theme (or Design System) at runtime for any other Theme (or Design System) included in the Additional Styles property. The change must be made for the same type of object.

Syntax

&Number = SetTheme("ObjectName")

Where:

"ObjectName"
    Name of the Theme object or Design System object to change.

Type returned:
Numeric(1)

Scope

Objects: Procedure, Transaction, Panel, Data Provider
Generators: .NET, .NET Framework, Java, Android, Apple, Angular

Description

This function changes the application Theme (or Design System) at runtime for any other Theme (or Design System) included in the Additional Styles property
The change must be made for the same type of object.
The function returns 1 when the change is successful, or 0 otherwise. 
If the object can't be changed, the current object remains as if the function was not executed. 
The change persists as long as the application session is active.

Samples

Event 'SetTheme'
   &num = SetTheme(!'SimpleAndroid')
Endevent

Availability

Design System Objects are supported by this function since GeneXus 17 Upgrade 6.

 

Last update: February 2024 | © GeneXus. All rights reserved. GeneXus Powered by Globant