Solved

how to make ToolStripButton aligned in the center of ToolStrip?

Posted on 2006-07-03
10
1,954 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
 

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
DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

 

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

3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

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…
Wouldn’t it be nice if you could test whether an element is contained in an array by using a Contains method just like the one available on List objects? Wouldn’t it be good if you could write code like this? (CODE) In .NET 3.5, this is possible…
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, just open a new email message. In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
With the power of JIRA, there's an unlimited number of ways you can customize it, use it and benefit from it. With that in mind, there's bound to be things that I wasn't able to cover in this course. With this summary we'll look at some places to go…

920 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

11 Experts available now in Live!

Get 1:1 Help Now