COMPANY
COMMUNITY
BLOG
HELP
MY ACCOUNT
EN PT ES

Imagen6256E

From the GeneXus Olimar version: Theme editor (III)

In this issue we will continue learning about the theme editor, and more specifically about the assignment of classes to a control and of themes to objects; we will also learn about making changes in themes.

3. Assigning classes to a control
 
Once an object has been associated to a theme, the object's controls will be associated to the default class that is compatible with a control, from the corresponding theme.


It is possible to change this class by modifying the control's class property.
 
The properties of modifiable classes are both the predefined one that is compatible with the control, and its derivatives, from the corresponding theme.


For instance, if a "Table2" class, derived from "Table" (having configured the "Table2" class as an omission) has been defined for a theme, and this theme is associated to an object, when a table is inserted in the form, the control's "class" property will become "Table2" by default, and a combo will be presented to choose the "Table" class as an alternative.
 
Classes may also be assigned in run-time.
 
Note: If a control's property is changed explicitly, these values will have priority over the value, of that particular property, that has been configured at theme level. This means that the values of configured properties are not taken at theme level, unless the property's value, in the control itself, is the default one.


4. Assigning themes to objects
 
Web Panels and Web Transactions are the objects to which a theme may be assigned.
 
Themes are associated to a GeneXus object in the following way:
 
·         Directly to the object, through "Object Properties - Theme". See "Theme Property"
·         To the model, by configuring the "Theme" property (File - Edit Model -  Properties).
·         To the knowledge base (File -  Edit Model -  Properties -  Theme, under design)
Notes:
 
·         The theme inheritance is Object-Model-Knowledge Base (Kb). This means that if an object does not have an associated theme, it takes it from the model, and if there is no theme associated to the model, it takes it from the Kb.


The way in which this has been implemented is the following:
 
A model's "Theme" property's default value is the value of the same KB's property; the by-omission value of an object's "Theme" property is the value of a model's "Theme" property.  
 
A single theme may be associated to an object. In order to assign more than one style-sheet to an object, the new "Access to a web object's header" properties may be used. 
On the other hand, if a web panel includes web components each one of them with an associated theme the resulting page will include all of the style sheets (that is, the style sheets of each web component).
 
With the GeneXus browser (Menu Tools -  Browsers), you can know which objects use a certain theme. For that, you must choose the "Callers Tree" option, from the "Information" combo, and the corresponding theme from "Pattern".


 5. Changes in a theme
 
Once the programs have been generated, changes in one of the themes only require proceeding with production of the file.css (where file is the name assigned to the theme). In some cases, in order to see the changes immediately reflected in the browser, it is necessary to push "ctrl-F5" for the updating to occur together with an elimination of the cache entries. 


Requirements:   .NET   Framework.  Internet   Explorer 5.01 or higher. The .NET Framework may be installed in the following operative systems:
- Microsoft   Windows® 98  
- Microsoft   Windows NT® 4.0 (SP 6a required)  
- Microsoft   Windows Millennium Edition (Windows Me)  
- Microsoft   Windows 2000 (SP2 recommended)  
- Microsoft   Windows XP Professional  
- Microsoft   Windows XP Home Edition

Get .NET Framework
 
Security

.NET handles a security level for the execution of components from that platform. The Theme editor requires a Full Trust security level. If it has been installed locally, the security at equipment and user level will usually meet this requirement. But if the editor is to be executed from the network (for instance when executed through GeneXus) the security level will, most likely, have to be modified.
Using the Microsoft Management Console you may modify the security level in different scenarios (- this tool box cannot be run on Windows98, Windows98 SE or Windows ME-; it can be found in Control Panel   Administrative Tools   Microsoft .NET Framework Configuration).
For implementing this modification, "Adjust .Net Security - Adjust the security level for each zone- local intranet" is selected and then configured in "Full Trust".

Registration

For using this application from other applications through COM, you must register through the regasm.exe tool box, located in: windows \Microsoft.net\Framework\v #version framework \regasm. Registration is simple (if you are in the directory of the GxThemeEditor.exe application): windows \Microsoft.net\Framework\v #version framework \regasm gxthemeeditor.exe

Related
From GeneXus Olimar version: Theme editor (II)
GeneXus Olimar version: conditional orders and filters