This is a migrated thread and some comments may be shown as answers.

Colours from database

3 Answers 18 Views
Menu
This is a migrated thread and some comments may be shown as answers.
Cheryl
Top achievements
Rank 1
Cheryl asked on 02 Sep 2008, 11:03 PM
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

3 Answers, 1 is accepted

Sort by
0
Yana
Telerik team
answered on 04 Sep 2008, 01:58 PM
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.
0
Cheryl
Top achievements
Rank 1
answered on 04 Sep 2008, 08:45 PM
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"

0
Yana
Telerik team
answered on 05 Sep 2008, 08:56 AM
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.
Tags
Menu
Asked by
Cheryl
Top achievements
Rank 1
Answers by
Yana
Telerik team
Cheryl
Top achievements
Rank 1
Share this question
or