472,969 Members | 1,899 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,969 software developers and data experts.

Design Time serialization

Ron
I have a custom control which has a custom designer. When I Enter the
control I am able to loop through all of the controls on the ParentForm and
set their TabIndex property from the designer. If I loop back through the
controls I see that their property is in fact reporting the correct
TabIndex(that I set from the designer)...However when I view the Forms
InitializeComponent code the TabIndex property still reports the original
value.

Is there anyway to force the controls to update the InitializeComponent code
for the Controls through a CustomDesigner by looping through the controls on
a given form?

internal class CustomTextboxDesigner : ControlDesigner
{
Form2 frm = new Form2();

public override void Initialize(IComponent comp)
{
base.Initialize(comp);
}

protected override void OnMouseEnter()
{
frm.Show();
Form parent = this.Control.Parent.FindForm();
int idx = 100;
foreach (Control ctrl in parent.Controls)
{
ctrl.TabIndex = idx;
idx++;
ctrl.Text = idx.ToString();
}
foreach (Control ctrl in parent.Controls)
{
frm.RTB.Text += ctrl.Name + " " + ctrl.TabIndex.ToString();
}
}

public override bool
CanBeParentedTo(System.ComponentModel.Design.IDesi gner parentDesigner)
{
return false;
}
}
}

the above code works but never serializes the values back to the form's
designer code.

Aug 15 '08 #1
0 841

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Dnf | last post by:
Hallo It is possible to force property of the control whith is of Hashtable (Dictionary<T>) type to serialize its content in Design-Time ?? -- Dominik Jeske
1
by: malcolm | last post by:
Hello, We use several user controls and derived custom controls. Some of which actually hit the database at design time to show data (such as filling a list box, etc...) Our c# client server...
2
by: WebWacker | last post by:
Hi, I'm trying to write a Control (inherited from Control) which contains four panels. These panels are created in the constructor, and are read-only. The individual properties of the panels...
1
by: danielhardman | last post by:
I am implementing a component that helps a developer with som localization tasks at design-time, and provides some related feature at run-time. My problem is that in order to do the design-time...
0
by: Edward Diener | last post by:
In Borland's VCL it was possible to divide a component into design time and run time DLLs. The design time DLL would only be necessary when the programmer was setting a component's properties or...
7
by: Shimon Sim | last post by:
I have a custom composite control I have following property
11
by: chopsnsauce | last post by:
Here's the example: Dim frm As New FORM1 Try frm.show Catch ex As Exception msgbox ex.message
0
by: AP Farszha | last post by:
Hello groovers, I have a component which i'm trying to add some design time support to. I wish to add design time support so that a readonly collection of ToolStripItems can be maintained via a...
4
by: Ken Fine | last post by:
I've been living with a frustrating issue with VS.NET for some months now and I need to figure out what the problem is. Hopefully someone has run into the same issue and can suggest a fix. I...
0
by: lllomh | last post by:
Define the method first this.state = { buttonBackgroundColor: 'green', isBlinking: false, // A new status is added to identify whether the button is blinking or not } autoStart=()=>{
2
by: DJRhino | last post by:
Was curious if anyone else was having this same issue or not.... I was just Up/Down graded to windows 11 and now my access combo boxes are not acting right. With win 10 I could start typing...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 4 Oct 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM) The start time is equivalent to 19:00 (7PM) in Central...
0
by: Aliciasmith | last post by:
In an age dominated by smartphones, having a mobile app for your business is no longer an option; it's a necessity. Whether you're a startup or an established enterprise, finding the right mobile app...
0
tracyyun
by: tracyyun | last post by:
Hello everyone, I have a question and would like some advice on network connectivity. I have one computer connected to my router via WiFi, but I have two other computers that I want to be able to...
2
by: giovanniandrean | last post by:
The energy model is structured as follows and uses excel sheets to give input data: 1-Utility.py contains all the functions needed to calculate the variables and other minor things (mentions...
1
by: Teri B | last post by:
Hi, I have created a sub-form Roles. In my course form the user selects the roles assigned to the course. 0ne-to-many. One course many roles. Then I created a report based on the Course form and...
0
isladogs
by: isladogs | last post by:
The next online meeting of the Access Europe User Group will be on Wednesday 6 Dec 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, Mike...
3
by: GKJR | last post by:
Does anyone have a recommendation to build a standalone application to replace an Access database? I have my bookkeeping software I developed in Access that I would like to make available to other...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.