PC Review


Reply
Thread Tools Rate Thread

Buttons Disappearance in a User Control - Unsolved Mystery?

 
 
Carlos Kirkconnell
Guest
Posts: n/a
 
      15th Aug 2003
I created a UserControl that had the following attribute set:

[Designer(typeof(System.Windows.Forms.Design.ParentControlDesigner))]

This attribute is for allowing this UserControl to contain other controls as
they are drag n dropped to the control. My UserControl has three buttons, at
the bottom, with their Anchor Property set to Bottom, Right in order for
them to always appear at the bottom right of the control.

Everything is nice, I place my UserControl on a form, then I place some
controls on top of my UserControl, everything looks ok, but then something
strange suddenly happens as I debug the code, when I run the application,
suddenly a "mysterious force" disappears my three buttons, which where part
of my UserControl. After that, there is no way of making my buttons to come
back again.

Something strange to note, is that if in the Form's InitializeComponents y
comment the lines where the designer places SuspendLayout() and
ResumeLayout( false ), suddenly my controls buttons come back. The thing is
I DONT WANT TO DO THAT ON EVERY FORM. Changing code placed by the designer
brings other problems...

Does anyone knows how to solve this Mystery?


 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
My unsolved mystery! Dan the Man Microsoft Excel Programming 3 7th May 2009 04:36 PM
Unsolved Mystery Mr. Anderson Microsoft Outlook 2 26th Nov 2006 07:19 AM
HELP!! Unsolved Mystery ahegstrom Microsoft Excel Misc 2 8th Jun 2005 07:26 PM
Unsolved Mystery?!? Danny Microsoft Windows 2000 1 19th Jan 2004 08:50 PM
Solver - unsolved mystery! jerschwab Microsoft Excel Misc 3 5th Dec 2003 07:22 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 01:49 PM.