Solved

ensure vb.net label is shown in centre of panel

Posted on 2016-08-02
2
46 Views
Last Modified: 2016-08-02
I have a grid made up of panels on each panel is a label, how do i ensure that the label is in the correct centre panel position so that when the label is shown (the text size varies a little) the text is in the centre.

the attached highlights whats happening
Capture.JPG
0
Comment
Question by:PeterBaileyUk
2 Comments
 
LVL 85

Accepted Solution

by:
Mike Tomlinson earned 500 total points
ID: 41739405
Make sure the AutoSize property of the Label is set to True, then set its Anchor property to None.  This should make it center both horizontally and vertically within its container.
0
 

Author Closing Comment

by:PeterBaileyUk
ID: 41739430
thank you
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering 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

It’s quite interesting for me as I worked with Excel using vb.net for some time. Here are some topics which I know want to share with others whom this might help. First of all if you are working with Excel then you need to Download the Following …
Creating an analog clock UserControl seems fairly straight forward.  It is, after all, essentially just a circle with several lines in it!  Two common approaches for rendering an analog clock typically involve either manually calculating points with…
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

830 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