Results 1 to 2 of 2

Thread: Panel Override OnPaint and Opacity Problem ? [Resolved]

  1. #1

    Thread Starter
    Member
    Join Date
    Mar 2004
    Location
    Canada
    Posts
    47

    Question Panel Override OnPaint and Opacity Problem ? [Resolved]

    Hi all,

    I have a wierd problem here. I created a new class that inherits a panel. Then I overrided the OnPaint event and filled the background with a gradient and changed it's shape. I then create an executable and add the panel with a button in it. Then when I run the App and change the opacity the button kind of disappears. I have attached sample source code.

    Thanks
    Dave
    Attached Files Attached Files
    Last edited by OctaneChicken; Dec 9th, 2004 at 01:23 PM.
    Dave

  2. #2

    Thread Starter
    Member
    Join Date
    Mar 2004
    Location
    Canada
    Posts
    47

    Re: Panel Override OnPaint and Opacity Problem ?

    Ok I solved my problem by adding
    Code:
    foreach (Control control in this.Controls )
    	{
                     control.Refresh();
    	    control.BringToFront();
    	}
    in the OnPaint

    Dave
    Last edited by OctaneChicken; Dec 10th, 2004 at 07:12 AM.
    Dave

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width