Forum Discussion

kyleabaker's avatar
kyleabaker
Visitor
11 years ago

GetThemeAttribute or something similar?

Is there a way to retrieve theme attributes that have been applied? For instance, can I find the value of "GridScreenLogoHD" (which should just be a path to an image)?

2 Replies

  • None that I'm aware of... I use the following to manage my themes via an object stored in the Global AA.

    Sub SetTheme(theme As Object)
    m.Theme = theme
    app = CreateObject("roAppManager")
    app.SetTheme(m.Theme)
    End Sub

    Function GetTheme() As Object
    If m.Theme = invalid Then
    m.Theme = {}
    End If
    Return m.Theme
    End Function

    Sub SetThemeAttribute(name As String, value As String)
    app = CreateObject("roAppManager")
    app.SetThemeAttribute(name, value)

    theme = GetTheme()
    theme[name] = value
    End Sub

    Function GetThemeAttribute(name As String, defaultValue = "" As String) As String
    theme = GetTheme()
    value = theme[name]
    If IsNullOrEmpty(value) Then
    value = defaultValue
    End If
    Return value
    End Function

    Sub ClearThemeAttribute(name)
    app = CreateObject("roAppManager")
    app.ClearThemeAttribute(name)

    theme = GetTheme()
    theme.Delete(name)
    End Sub
  • "TheEndless" wrote:
    None that I'm aware of... I use the following to manage my themes via an object stored in the Global AA.

    Sub SetTheme(theme As Object)
    m.Theme = theme
    app = CreateObject("roAppManager")
    app.SetTheme(m.Theme)
    End Sub

    Function GetTheme() As Object
    If m.Theme = invalid Then
    m.Theme = {}
    End If
    Return m.Theme
    End Function

    Sub SetThemeAttribute(name As String, value As String)
    app = CreateObject("roAppManager")
    app.SetThemeAttribute(name, value)

    theme = GetTheme()
    theme[name] = value
    End Sub

    Function GetThemeAttribute(name As String, defaultValue = "" As String) As String
    theme = GetTheme()
    value = theme[name]
    If IsNullOrEmpty(value) Then
    value = defaultValue
    End If
    Return value
    End Function

    Sub ClearThemeAttribute(name)
    app = CreateObject("roAppManager")
    app.ClearThemeAttribute(name)

    theme = GetTheme()
    theme.Delete(name)
    End Sub


    That's a nice workaround, thanks!