Difference: 0LASubrWidgetApplyTheme (4 vs. 5)

Revision 52012-02-24 - JeanNeron

Line: 1 to 1
 
META TOPICPARENT name="APPXRuntimeSubroutineAPI"

.WIDGET APPLY THEME

Line: 15 to 15
  This subroutine applies a GUI Theme to the the current image. No parameters are required, however, some setup is needed.
Changed:
<
<
Before you can use this subroutine, you must create at least one MENU process to act as a 'theme'. On the image of the menu process, add various Widgets for the elements you want to standardize. For example, if you want all your buttons to have certain foreground/background/rollover colors, then define a button with the desired attributes. The same thing applies to Titlebar attributes, background images, items (fields), and so on. If you have standard attributes you want applied to some buttons, but not others, then define another button and give it a name. For example, you might want to have your 'Cancel' buttons look different from other buttons. You could give it the name CANCEL BUTTON. On the images in your application where you want a button to use those attributes, give it the same name. This technique applies to all Widget types.
>
>
Before you can use this subroutine, you must create at least one MENU process to act as a 'theme'. On the image of the menu process, add various Widgets for the elements you want to standardize. For example, if you want all your buttons to have certain foreground/background/rollover colors, then define a button with the desired attributes. The same thing applies to Titlebar attributes, background images, items (fields), and so on. If you have standard attributes you want applied to some buttons, but not others, then define another button and give it a name. For example, you might want to have your 'Cancel' buttons look different from other buttons. You could give it the name CANCEL BUTTON. On the images in your application where you want a button to use those attributes, give it the same name. This technique applies to all Widget types. If the subroutine cannot find a match in your theme for a particular name, it will default to the unnamed widget in your theme. In other words, if your theme did not contain a button called CANCEL BUTTON it would use the unnamed button, if there was one.
  You might want to consider giving this Menu a distinctive name to make it obvious this is not a normal menu, ie, prefix it with a ":" or other special character. The name of this process will be your 'Theme Name'.
Line: 27 to 27
  This subroutine copies micro adjustments, resources, all color settings, fonts, font styles, font sizes, text positions, margins, tiling mode, location type, tooltips, and the settings for the Close, Ok and Help buttons to the GUI attributes of the widgets on the current image. It only replaces default settings, so if you have manually set a font, color or other attribute, that will remain unchanged.
Added:
>
>
If you want your theme to apply to the Appx runtime processes (ie, Scan, Disposition, Help, etc), then copy your theme to a new process with ".STANDARD TITLED FRAME" appended to it.
 

Comments:

Read what other users have said about this page or add your own comments.

 
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2024 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback