PC Review


Reply
Thread Tools Rate Thread

Custom Design Surface .NET 2.0: problem with visual inheritance anchoring

 
 
j@thewolfweb.com
Guest
Posts: n/a
 
      1st Dec 2006
We have a custom design surface where users can select a base form and
create a derived form.

I'm deriving from CodeDomDesignerLoader for my loader, which was most
of the work.

A problem arises when a control on the base form is anchored to the
right side of the form, and then the derived form is resized.

In the case below, we resize the derived for to be ~200 pixels greater
than the base form. The controls are all explicitly declared with
their new sizes.

Once saved and reloaded in the designer, the controls on the derived
form are ~200 pixels greater right widths for the derived form. The
run off the right size of the form. Even if i save and close the app
and reload, they still appear this way. However, they work correctly
at runtime.

I figure this SuspendLayout/ResumeLayout are not getting called by the
designer in the right order, but this is difficult to confirm. What is
the visual studio designer be doing that I'm not doing?

Thanks in advance for any help!

The code for the derived form is below:

'------------------------------------------------------------------------------
' <auto-generated>
' This code was generated by a tool.
' Runtime Version:2.0.50727.42
'
' Changes to this file may cause incorrect behavior and will be
lost if
' the code is regenerated.
' </auto-generated>
'------------------------------------------------------------------------------

Option Strict On
Option Explicit On


Namespace Elsinore.CustomForms

Public Class SearchFormEx
Inherits Elsinore.Engine.Windows.Forms.SearchForm

Public Sub New()
MyBase.New
Me.InitializeComponent
End Sub

Private Sub InitializeComponent()
Me.TextSearchControlsPanel.SuspendLayout
Me.SuspendLayout
'
'TextSearchControlsPanel
'
Me.TextSearchControlsPanel.Size = New
System.Drawing.Size(782, 168)
'
'MatchTypeComboBox
'
Me.MatchTypeComboBox.Size = New System.Drawing.Size(762,
21)
'
'TextSearchPropertiesPanel
'
Me.TextSearchPropertiesPanel.Size = New
System.Drawing.Size(762, 62)
'
'SearchStringTextBox
'
Me.SearchStringTextBox.Size = New System.Drawing.Size(762,
20)
'
'CustomControlsPanel
'
Me.CustomControlsPanel.Size = New System.Drawing.Size(782,
332)
'
'SearchFormEx
'
Me.Name = "SearchFormEx"
Me.Size = New System.Drawing.Size(782, 500)
Me.TextSearchControlsPanel.ResumeLayout(false)
Me.TextSearchControlsPanel.PerformLayout
Me.ResumeLayout(false)
End Sub
End Class
End Namespace

 
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
Visual form inheritance at design time GD Microsoft Dot NET Compact Framework 4 7th Jun 2006 03:40 PM
Problem with visual inheritance nadavdolinsky@gmail.com Microsoft VB .NET 2 20th Mar 2006 10:56 AM
Custom Control- Something to see on design surface Charlie@CBFC Microsoft ASP .NET 0 15th Sep 2005 10:07 PM
Visual inheritance and DESIGN constant: Where is it? =?Utf-8?B?U3RyaWRlcg==?= Microsoft Dot NET Compact Framework 2 14th Oct 2004 12:49 PM
Visual inheritance problem... Deena Microsoft C# .NET 2 23rd Jun 2004 04:02 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 09:58 AM.