Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 864701
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T09:31:17+00:00 2026-05-15T09:31:17+00:00

EDITED FOR BETTER UNDERSTANDING I made a custom control with propertise for some global

  • 0

EDITED FOR BETTER UNDERSTANDING

I made a custom control with propertise for some global variables.

private string[] LBTitles = new string[1] { "Rien" };
//...
[CategoryAttribute("WildData"), DescriptionAttribute("Tableau des noms des titres au dessus de le listbox")]
public string[] Titles
{
    get { return LBTitles; }

    set { LBTitles = value; OnColumns(EventArgs.Empty); }
}

OnColums does many things to format the control.
One among others is:

int vLongest = 0;
//...
//Si le plus long est plus petit que le titre de la colonne
if (vLongest < LBTitles[i].Length)
{
    vLongest = LBTitles[i].Length;
}

The above is for my control itself. Everything work fine, its a wonderful day, etc.

Now when it comes to add it to a form:
– I add it, everything is ok
– I modify the properties via the design, everything is ok
– I try to run it… there is the problem.

When I build, it add into InitializeComponent() the following code:

this.wildList1 = new WildList.WildList();
//Which is ok but also it add, everytime I build, this:
            // 
            // wildList1
            // 
            this.wildList1.Colors = new string[] {
        null};
            this.wildList1.Font = new System.Drawing.Font("Courier New", 8F);
            this.wildList1.Location = new System.Drawing.Point(211, 33);
            this.wildList1.Name = "wildList1";
            this.wildList1.Positions = new int[] {
        0};
            this.wildList1.Size = new System.Drawing.Size(238, 224);
            this.wildList1.TabIndex = 16;
            this.wildList1.Titles = new string[] {
        null};

It add lines of code that reset my arrays.
Why?
How can I get ride of them? Or at least, make them use the values entered by the programmer (aka me) into the designer?

Because when it goes throu the line that reset it, it also call the property “set”, which call OnColumns, which then try to do stuff with empty arrays, which cause a crash.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-15T09:31:18+00:00Added an answer on May 15, 2026 at 9:31 am

    I found out the problem.

    It was due to the reference of the dll of the control. It was using a “cached” or I dont know version of my control when I tested it for the first time (and was buggy), even if I was changing the .dll file that it was using. So I completely wiped the reference and made a new one with the unbugged version dll and everything work fine now.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I Have a control inheriting the dataGridView control. I have the onLostFocus method overrided.
New to rails and I have what I think is a basic question. In
I'm creating a Django powered website that will have numerous applications (Blog, Shop, Portfolio,
what is good,using explicite cursor,while loop on database side OR using loop on front
I have the table Tb ID | Name | Desc ------------------------- 1 | Sample
I have recently started working on a legacy application that has most of its
I have a simple URLField in my model link = models.URLField(verify_exists = False, max_length
Designing a fairly complicated site with a lot of ajax running on a single
I am building a website using asp.net and this website will host users images
I have two date fields that I need to join on. The first is

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.