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 3437620
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T08:05:15+00:00 2026-05-18T08:05:15+00:00

I need to add a set of custom ToolStripItem (containing the additional property formReference

  • 0

I need to add a set of custom ToolStripItem (containing the additional property formReference) to a ToolStripPanel but they won’t appear for some reason.

Code for adding the items:

foreach (Form form in Application.OpenForms)
if (form.Name != "MainForm")
{
    myToolStripItem mtsi = new myToolStripItem(form.Text, null, open_form);
    mtsi.formReference = form;
    tspTaskBar.Items.Add(mtsi);
}

myToolStripItem:

public class myToolStripItem : ToolStripItem
{
    public object formReference { get; set; }

    public myToolStripItem(string text, System.Drawing.Image image, EventHandler onClick)
        : base(text,image,onClick) { }

    protected override void OnPaint(PaintEventArgs e)
    {
        base.OnPaint(e);
    }
}

Can you please point me to what I’m doing wrong? Thank you.

  • 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-18T08:05:16+00:00Added an answer on May 18, 2026 at 8:05 am

    I think the problem might be that ToolStripPanel is a panel for ToolStrips and a ToolStrip is the actual place where you put ToolStripItems. Try putting a ToolStrip inside your ToolStripPanel and putting your custom ToolStripItem into that ToolStrip.

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

Sidebar

Related Questions

Ok I have some custom Omniture code I need to add to a Drupal
On the select event of the datepicker I need to add and set values
I have a java.util.Set<City> cities and I need to add cities to this set
#!/bin/bash # module add apps/java/1.6 java -Xmx1024m HelloWorld I need to set -XmxYm where
I am using the Jquery Validation plug-in, however i need to add a custom
What methods do I need to add to a custom Java class so that
I need to set custom attributes on a control as it is bound to
I need to add some random html content with text before and after my
I really need a second set of eyes on this so I'm hoping some
I need to add a custom language (iOS has no localisation for it) among

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.