?
Solved

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

Posted on 2014-02-02
11
Medium Priority
?
261 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
RHCE - Red Hat OpenStack Prep Course

This course will provide in-depth training so that students who currently hold the EX200 & EX210 certifications can sit for the EX310 exam. Students will learn how to deploy & manage a full Red Hat environment with Ceph block storage, & integrate Ceph into other OpenStack service

 
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

The Orion Papers

Are you interested in becoming an AWS Certified Solutions Architect?

Discover a new interactive way of training for the exam.

Question has a verified solution.

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

This article describes relatively difficult and non-obvious issues that are likely to arise when creating COM class in Visual Studio and deploying it by professional MSI-authoring tools. It is assumed that the reader is already familiar with the cla…
This document covers how to connect to SQL Server and browse its contents.  It is meant for those new to Visual Studio and/or working with Microsoft SQL Server.  It is not a guide to building SQL Server database connections in your code.  This is mo…
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…
This is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.
Suggested Courses

777 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