Solved

ensure vb.net label is shown in centre of panel

Posted on 2016-08-02
2
33 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Tabcontrol Caption? 1 30
Change data in datatable 8 31
Protecting vb6 & .Net code Obfuscation 18 96
update textboxes with Streamreader 21 42
This article explains how to create and use a custom WaterMark textbox class.  The custom WaterMark textbox class allows you to set the WaterMark Background Color and WaterMark text at design time.   IMAGE OF WATERMARKS STEPS Create VB …
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
Migrating to Microsoft Office 365 is becoming increasingly popular for organizations both large and small. If you have made the leap to Microsoft’s cloud platform, you know that you will need to create a corporate email signature for your Office 365…
This is used to tweak the memory usage for your computer, it is used for servers more so than workstations but just be careful editing registry settings as it may cause irreversible results. I hold no responsibility for anything you do to the regist…

896 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

14 Experts available now in Live!

Get 1:1 Help Now