Solved

How to paint the backcolor of a panel yellow using the Paint-event

Posted on 2014-02-02
11
260 Views
Last Modified: 2014-02-07
Hi,

I am looking for code to paint the backcolor yellow (color = info) of a panel through the paint-event. I use c#

Peter
0
Comment
Question by:peterkiers
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
  • 4
11 Comments
 
LVL 35

Expert Comment

by:gr8gonzo
ID: 39828615
Is there a reason you don't just set the BackColor property of the panel to Color.<whatever named color you want> ?
0
 
LVL 1

Author Comment

by:peterkiers
ID: 39828894
Yes, want to do that on a devexpress panel called the grouppanel. But setting the property BackColor to Info isn't working. Peter.
0
 
LVL 1

Author Comment

by:peterkiers
ID: 39831601
I've requested that this question be deleted for the following reason:

Found another way to solve this.
0
MS Dynamics Made Instantly Simpler

Make Your Microsoft Dynamics Investment Count  & Drastically Decrease Training Time by Providing Intuitive Step-By-Step WalkThru Tutorials.

 
LVL 35

Expert Comment

by:gr8gonzo
ID: 39831602
If you found a different way, please describe it here. Don't just delete the question.
0
 
LVL 1

Accepted Solution

by:
peterkiers earned 0 total points
ID: 39832251
Oke, I have chosen the DevExpress group control instead of the standard panel.
changing the back color of a GroupControl, you'll need to set the LookAndFeel.UseDefaultLookAndFeel property to false, and the LookAndFeel.Style property to Flat.

Peter
0
 
LVL 1

Author Comment

by:peterkiers
ID: 39835225
I've requested that this question be closed as follows:

Accepted answer: 0 points for peterkiers's comment #a39832251

for the following reason:

This is the right way to change the color of a groupcontrol from DevExpress.
0
 
LVL 35

Expert Comment

by:gr8gonzo
ID: 39834655
Thanks!
0
 
LVL 35

Expert Comment

by:gr8gonzo
ID: 39841293
Err... the thanks was for posting your answer. I shouldn't get points if mine wasn't the correct one.
0
 
LVL 35

Expert Comment

by:gr8gonzo
ID: 39842202
Thanks, Netminder! Sorry for the confusion. Was just trying to make sure that future people with the same problem would be able to find Peter's answer.
0

Featured Post

Resolve Critical IT Incidents Fast

If your data, services or processes become compromised, your organization can suffer damage in just minutes and how fast you communicate during a major IT incident is everything. Learn how to immediately identify incidents & best practices to resolve them quickly and effectively.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The object model of .Net can be overwhelming at times – so overwhelming that quite trivial tasks often take hours of research. In this case, the task at hand was to populate the datagrid from SQL Server database in Visual Studio 2008 Windows applica…
Recently while returning home from work my wife (another .NET developer) was murmuring something. On further poking she said that she has been assigned a task where she has to serialize and deserialize objects and she is afraid of serialization. Wha…
This is a high-level webinar that covers the history of enterprise open source database use. It addresses both the advantages companies see in using open source database technologies, as well as the fears and reservations they might have. In this…
NetCrunch network monitor is a highly extensive platform for network monitoring and alert generation. In this video you'll see a live demo of NetCrunch with most notable features explained in a walk-through manner. You'll also get to know the philos…

707 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question