Click here to Skip to main content
16,020,568 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I had a problem in the code change from the regular form a ribbon form devexpress 9.3
in the regular form I am using code below

C#
protected override void OnPaint(PaintEventArgs e)
        {
            pictureBox1.Image = RImage;
        }




but after using the form ribbon above code is not executed
is there any substitute code above

(above code is used to display the image changes into a PictureBox)
Posted

Basically I'm fairly impressed with, and a regular user of, the DevExpress comonents.

OriginalGriff is right: you should not have to handle the OnPaint event.

Is this someting you have introduced after altering your form to a ribbon form?

For a ribbon form there is a lot of painting and sizing stuff going on behind the scenes, and it usually works very well.

Try investigating the creation order of your components, or move them to an XtraPanel.

I would try searching the DevExpress forums for an answer, or post it as a new problem. They are usually very acommodating and responsive.

Regards
Espen Harlinn
 
Share this answer
 
Comments
Dalek Dave 9-Jan-11 14:03pm    
Good Answer.
Espen Harlinn 9-Jan-11 16:39pm    
Thanks Dalek!
You don't need to do that in a Paint event - the PictureBox should hold the Image property and display itself as needed. You don't even need to Invalidate the PictureBox - the Image property setter should do that for you.

It is normal to set the Image property when the user decides which picture to show: Try removing your Rimage variable and referring to the PictureBox.Image property instead.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900