Solved

how to make ToolStripButton aligned in the center of ToolStrip?

Posted on 2006-07-03
10
1,984 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
Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

 

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

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Export import database 4 51
Run time Error 4 47
open System.IO.Compression.ZipArchiveEntry as ZipFile without storing to file 2 56
SQL Help 27 43
Summary Displaying images in RichTextBox is a common requirement with limited solutions available. Pasting through clipboard or embedding into RTF content only support static images.  This article describes how to insert Windows control objects int…
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…
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…

776 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