?
Solved

Toolbar button issue

Posted on 2009-05-20
4
Medium Priority
?
187 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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 1000 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

On Demand Webinar: Networking for the Cloud Era

Ready to improve network connectivity? Watch this webinar to learn how SD-WANs and a one-click instant connect tool can boost provisions, deployment, and management of your cloud connection.

Question has a verified solution.

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

1.0 - Introduction Converting Visual Basic 6.0 (VB6) to Visual Basic 2008+ (VB.NET). If ever there was a subject full of murkiness and bad decisions, it is this one!   The first problem seems to be that people considering this task of converting…
Microsoft Reports are based on a report definition, which is an XML file that describes data and layout for the report, with a different extension. You can create a client-side report definition language (*.rdlc) file with Visual Studio, and build g…
Michael from AdRem Software outlines event notifications and Automatic Corrective Actions in network monitoring. Automatic Corrective Actions are scripts, which can automatically run upon discovery of a certain undesirable condition in your network.…
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…
Suggested Courses

800 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