C1 Community
ComponentOne Community is a free source for developers and help authors to collaborate and communicate.

How can i set background (color or images) for menu items list ?

rated by 0 users
This post has 1 Reply | 2 Followers

Not Ranked
Posts 1
lethanh Posted: Wed, May 20 2009 3:27 AM

 Hi,

I use C1Menu to create my menu. Now i want to change background color for menu items list (after i click an item, one items list drops down) :

Default with white color:

 

 After changing:

 

 

Thank you so much !

Top 25 Contributor
Posts 372

 Hello,

Give this code a try within your C1Menu's click event.

            foreach (C1MenuItemBase item in e.Item.Owner.Items)
            {
                item.ControlStyle.BackColor = System.Drawing.Color.Red;
            }

   -OR-

            foreach (C1MenuItemBase item in e.Item.Items)
            {
                item.ControlStyle.BackColor = System.Drawing.Color.Red;
            }

I hope this helps!

-Raleigh

Page 1 of 1 (2 items) | RSS
Contact ComponentOne: 1.800.858.2739 ©1987-2010 ComponentOne LLC All Rights Reserved.