Solved

how to make ToolStripButton aligned in the center of ToolStrip?

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

thanksalot!
pckben.
0
Comment
Question by:pckben
[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
  • 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
Monthly Recap

May was a big month for new releases from Linux Academy! Take a look at what our team built recently in our blog. You can access the newest releases from our blog.

 

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

Get your Conversational Ransomware Defense e‑book

This e-book gives you an insight into the ransomware threat and reviews the fundamentals of top-notch ransomware preparedness and recovery. To help you protect yourself and your organization. The initial infection may be inevitable, so the best protection is to be fully prepared.

Question has a verified solution.

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

In my previous article (http://www.experts-exchange.com/Programming/Languages/.NET/.NET_Framework_3.x/A_4362-Serialization-in-NET-1.html) we saw the basics of serialization and how types/objects can be serialized to Binary format. In this blog we wi…
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
In this video, viewers are given an introduction to using the Windows 10 Snipping Tool, how to quickly locate it when it's needed and also how make it always available with a single click of a mouse button, by pinning it to the Desktop Task Bar. Int…
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…

636 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