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
Solved

how to make ToolStripButton aligned in the center of ToolStrip?

Posted on 2006-07-03
10
2,022 Views
Last Modified: 2008-01-09
Is it possible? Or anyone could find the solution for this?

thanksalot!
pckben.
0
Comment
Question by:pckben
  • 5
  • 5
10 Comments
 
LVL 96

Accepted Solution

by:
Bob Learned earned 125 total points
ID: 17032811
Possibility:
   Add one item, set AutoSize = false, and set the width so that the button would be aligned in the center.

VB.NET or C#?

Bob
0
 

Author Comment

by:pckben
ID: 17032866
yes, i was doing like that also. But i would like to here if there's a nicer solution... (cuz this would cause some freeze when we resize the window...)
it's ok for me in VB.NET or C#
Thanks for your reply though, Bob.
0
 
LVL 96

Expert Comment

by:Bob Learned
ID: 17033023
No, there isn't any "nicer" way.  Why would you want to do something non-standard like this?

Bob
0
The New “Normal” in Modern Enterprise Operations

DevOps for the modern enterprise offers many benefits — increased agility, productivity, and more, but digital transformation isn’t easy, especially if you’re not addressing the right issues. Register for the webinar to dive into the “new normal” for enterprise modern ops.

 

Author Comment

by:pckben
ID: 17033028
oops is that the standard solution?
0
 
LVL 96

Expert Comment

by:Bob Learned
ID: 17033049
No, I mean why would you want to center a button on the ToolStrip (that is the non-standard way)?  Buttons should be span from either the right or the left-hand side of the ToolStrip.

Bob
0
 

Author Comment

by:pckben
ID: 17033075
Ya i noe this is not standard, just a bit curiosity with a bit lazy. Actually i want to use that "nice-design" strip and its child items to put somewhere on my form but too lazy to draw by myself such a bar ^_^
i'll give you 125 points for your quickly replies, but actually i found the solution by myselft :p

pckben.
0
 
LVL 96

Expert Comment

by:Bob Learned
ID: 17033091
What did you do?

Bob
0
 

Author Comment

by:pckben
ID: 17033101
i also did exactly the same way as you. Put a blank lable before the button, then resize it properly
0
 
LVL 96

Expert Comment

by:Bob Learned
ID: 17033119
Then, why the "C" grade?  Makes me look bad :(

Bob
0
 

Author Comment

by:pckben
ID: 17033134
oops! i'm sorry, i just hoped to find a "nicer" way here, ...
^^
anyways, i'm really thankful for your help!
0

Featured Post

Networking for the Cloud Era

Join Microsoft and Riverbed for a discussion and demonstration of enhancements to SteelConnect:
-One-click orchestration and cloud connectivity in Azure environments
-Tight integration of SD-WAN and WAN optimization capabilities
-Scalability and resiliency equal to a data center

Question has a verified solution.

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

More often than not, we developers are confronted with a need: a need to make some kind of magic happen via code. Whether it is for a client, for the boss, or for our own personal projects, the need must be satisfied. Most of the time, the Framework…
Today I had a very interesting conundrum that had to get solved quickly. Needless to say, it wasn't resolved quickly because when we needed it we were very rushed, but as soon as the conference call was over and I took a step back I saw the correct …
Established in 1997, Technology Architects has become one of the most reputable technology solutions companies in the country. TA have been providing businesses with cost effective state-of-the-art solutions and unparalleled service that is designed…

809 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