User Tools

Site Tools


usecustomtheme_apply_custom_theme_colors_.htm
Navigation:  Templates > Guide to all Templates > Additional Libraries and Templates > MenuStyleManager Class > MenuStyleManager Methods >====== UseCustomTheme (Apply Custom Theme Colors) ====== Previous pageReturn to chapter overviewNext page

UseCustomTheme( <;UseOSTheme> )

UseOSTheme A BYTE used to determine if the active menu style theme is using colors from the operating system active theme.

blk2blue.jpg

UseCustomTheme is used to allow a menu style color theme to use all or part of the default operating system settings. When TRUE, any color or element not explicitly set by the active theme will use default setting by the operating system.

This method is overloaded. When the UseOSTheme parameter is omitted, UseCustomTheme returns TRUE (1) if the operating system's colors and settings are available for use. It does this by simply returning the value of the UseCustomTheme MenuStyle interface (usually set by the UseOSTheme parameter).

Implementation:

The UseCustomTheme method is used when applying any default style supported by the template interface. If the theme is 'Default', the method is set to FALSE. Otherwise, all other built-in menu styles supported by the templates have UseCustomTheme set to TRUE.

Return Value (when UseOSTheme parameter is omitted):     BYTE

Example:

 CODE

 IF NOT SELF.InitMenuInterface()

  RETURN

 END

 IF UPPER(pTheme) = 'OFF'

  IF SELF.ForceTheme

   SELF.IgnoreWindowsTheme(FALSE)

   SELF.SetDefaultThemeValues()

   RETURN

  ELSE

   SELF.UseCustomTheme(FALSE)

   RETURN

  END

 END

 IF UPPER(pTheme) = 'DEFAULT'

  SELF.IgnoreWindowsTheme(FALSE)

  SELF.SetDefaultThemeValues()

  RETURN

 END

SELF.UseCustomTheme(TRUE)

 SELF.SetDefaultThemeValues()

 SELF.IgnoreWindowsTheme(TRUE)

 CASE(UPPER(pTheme))

 OF 'AUTO'

   SELF.SetImageBar(TRUE)

   SELF.IgnoreWindowsTheme(FALSE)

   SELF.SetThemeColors()

 END

See Also: SetCustomThemeColors(Set Custom Menu Colors and Indicators)

usecustomtheme_apply_custom_theme_colors_.htm.txt · Last modified: 2021/04/15 15:57 (external edit)