Solved

Toolbar button issue

Posted on 2009-05-20
4
186 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 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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

I think the Typed DataTable and Typed DataSet are very good options when working with data, but I don't like auto-generated code. First, I create an Abstract Class for my DataTables Common Code.  This class Inherits from DataTable. Also, it can …
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…
Come and listen to Percona CEO Peter Zaitsev discuss what’s new in Percona open source software, including Percona Server for MySQL (https://www.percona.com/software/mysql-database/percona-server) and MongoDB (https://www.percona.com/software/mongo-…
NetCrunch network monitor is a highly extensive platform for network monitoring and alert generation. In this video you'll see a live demo of NetCrunch with most notable features explained in a walk-through manner. You'll also get to know the philos…

691 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