Click here to Skip to main content
15,889,931 members
Please Sign up or sign in to vote.
3.00/5 (1 vote)
Hi to all!

I created user control that contain ToolStrip and DGV and add it to form. I accessible ToolStrip by define as public properties

C#
public ToolStrip Toolbar
    {
        set { ToolBarToolStrip = value; }
        get { return ToolBarToolStrip; }
    }

Now I can add item to it in the form. butt problem is when form refresh (for example when change image of picture box) all change dismiss.

what's problem?

thanks
Posted
Comments
[no name] 24-May-14 5:06am    
You said, "all change dismiss". What does that mean?
ali majed 24-May-14 5:41am    
Thanks for your reply
I add some items to ToolStrip in the form contain user-control successfully but in refresh form (such as change picture box image)"all change dismiss" in another word added item removed.
BillWoodruff 25-May-14 1:28am    
The only thing that should cause new elements added to a ToolStrip at run-time to "disappear" would be closing your application.

1 solution

try with

C#
public static ToolStrip Toolbar
{
    set { ToolBarToolStrip = value; }
    get { return ToolBarToolStrip; }
}
 
Share this answer
 
Comments
ali majed 24-May-14 5:59am    
thanks for your replay

I do it. butt "Toolbar" user-control properties removed
:(

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900