Colours from database

4 posts, 0 answers
  1. Cheryl
    Cheryl avatar
    45 posts
    Member since:
    Jul 2006

    Posted 02 Sep 2008 Link to this post

    Hello

    It is possible to set the colours and fonts for the menus from a database rather than via stylesheets?

    We currently use another menu component where we can set the colours, fonts, etc of the main menu level and separately the submenus from a database.

    If we move to use Telerik's menu, then we need to be able to do this somehow.

    Thanks
  2. Yana
    Admin
    Yana avatar
    4985 posts

    Posted 04 Sep 2008 Link to this post

    Hi Cheryl,

    Could you please explain in more detail how the styles are set from the database? Thanks

    Regards,
    Yana
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
  3. Cheryl
    Cheryl avatar
    45 posts
    Member since:
    Jul 2006

    Posted 04 Sep 2008 Link to this post

    Hi Yana

    In this other menu component, it is simple - there are properties that I can set. 
    Here are some of them as an example: 

    Colors:

    Me

    .QMenu.MenuBar.BackgroundColor = odsconfig.Tables("config").Rows(0).Item("cmenucol").ToString.Trim

    ' This is the popup menus background colour

    Me.QMenu.BackgroundColor = odsconfig.Tables("config").Rows(0).Item("cmenucol").ToString.Trim

    ' this is the text colour for the popup menu items

    Me.QMenu.ItemFont.Color = odsconfig.Tables("config").Rows(0).Item("cmenutxt").ToString.Trim

    ' this is the text colour for the main menu bar items

    Me.QMenu.ButtonFont.Color = odsconfig.Tables("config").Rows(0).Item("cmenutxt").ToString.Trim

    Fonts:

    Me

    .QMenu.ButtonFont.Family = "Tahoma"

    Me.QMenu.ItemFont.Family = "Tahoma"

    Me.QMenu.ButtonFont.Size = "10pt"

    Me.QMenu.ItemFont.Size = "10pt"

    Me

    .QMenu.ButtonFont.Weight = "bold"

    Me.QMenu.ItemFont.Weight = "bold"

  4. Yana
    Admin
    Yana avatar
    4985 posts

    Posted 05 Sep 2008 Link to this post

    Hello Cheryl,

    Unfortunately, this is not completely supported. You can set ForeColor and BackColor properties of RadMenu items in the code, also cssClass, FocusedCssClass, ClickedCssClass, DisabledCssClass and ExpandedCssClass properties can apply styles to the items.

    Regards,
    Yana
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Back to Top