Solved

Toolbar button issue

Posted on 2009-05-20
4
182 Views
Last Modified: 2012-05-07
When I add a button to a tool bar I position it where I want it to show but at run time it always positions at the end of the tool bar.  How do I make it stay where I position it.
0
Comment
Question by:Moed
  • 2
  • 2
4 Comments
 
LVL 15

Expert Comment

by:oobayly
ID: 24431829
When you say "position", do you mean it's location in pixels from the left, or it's position relative to other toolbar items.
Also, is this the ToolStrip (new with .Net v.2), or the original ToolBar?
Any chance you can post a screenshot comparing design-time to run-time?
0
 
LVL 2

Author Comment

by:Moed
ID: 24431897
This is the tool strip control vs 2008.  When you click the add item button then select button it inserts the button at the last position.  I then drag the button to the position on the toolstrip. When I run the project the button has moved back to the last position.
0
 
LVL 15

Accepted Solution

by:
oobayly earned 250 total points
ID: 24432580
Can't see any reason why that should happen. When you close the project in VS & reopen it, does the button move to the last position like it does at run-time? It sounds like changes to the Designer code aren't being retained. If this is the case, you could try creating a new ToolStrip & adding all the buttons again. Tedious I know, but it's sometimes easier than monkeying around with the Designer generated code.

Could you have any code that manipulates the Toolstrip when the form is constructed or loaded?
0
 
LVL 2

Author Comment

by:Moed
ID: 24433763
Just what I do to overcome the problem.  I've got a feeling you're right about deleting the toolstrip and starting over.  I think I'll skip it for now and just reposition the buttons on the form load.  I thought there might be an easy solution (like index numbers etc..) that I just wasn't seeing.

Thanks for the help.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Well, all of us have seen the multiple EXCEL.EXE's in task manager that won't die even if you call the .close, .dispose methods. Try this method to kill any excels in memory. You can copy the kill function to create a check function and replace the …
Creating an analog clock UserControl seems fairly straight forward.  It is, after all, essentially just a circle with several lines in it!  Two common approaches for rendering an analog clock typically involve either manually calculating points with…
This tutorial gives a high-level tour of the interface of Marketo (a marketing automation tool to help businesses track and engage prospective customers and drive them to purchase). You will see the main areas including Marketing Activities, Design …
Many functions in Excel can make decisions. The most simple of these is the IF function: it returns a value depending on whether a condition you describe is true or false. Once you get the hang of using the IF function, you will find it easier to us…

911 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now