Solved

Height and width on items on form

Posted on 2014-02-27
5
258 Views
Last Modified: 2014-02-27
Hello,

I need some help on the height and width issue of items on my form. Currently I've tried anchoring two picture boxes on my form so that they are split 50 /50 as outlined in the design but with no luck as the two picture boxes are all over the place.

Design
0
Comment
Question by:lincstech
5 Comments
 
LVL 13

Expert Comment

by:Santosh Gupta
ID: 39891789
Hi,

Go to Tools | Options to display the Options dialog box. On the left side, select Windows Forms Designer. On the right, under Layout Settings, set Show Grid to true.
0
 

Author Comment

by:lincstech
ID: 39891823
That was already selected. If you take a look at this image on the left the picture box has been anchored to the top and left and on the right the picture box has been anchored to the top and right, however there is a big gap in the middle. It's this gap that I'm struggling to fill. this happens when the form is debugged.

imgae
0
 
LVL 83

Expert Comment

by:CodeCruiser
ID: 39891866
Try anchoring both to "Top, Left, Right".
0
 

Author Comment

by:lincstech
ID: 39891881
Did that and I also added this code but they just overlap

 picturebox1.Width = picturebox2.Width / 2 

Open in new window

0
 
LVL 85

Accepted Solution

by:
Mike Tomlinson earned 500 total points
ID: 39891963
No amount of Dock/Anchor is going to get a 50/50 split that properly resizes with the form.  This is exactly what the TableLayoutPanel() control is for!
0

Featured Post

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.

Question has a verified solution.

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

Phishing is at the top of most security top 10 efforts you should be pursuing in 2016 and beyond. If you don't have phishing incorporated into your Security Awareness Program yet, now is the time. Phishers, and the scams they use, are only going to …
Stuck in voice control mode on your Amazon Firestick?  Here is how to turn it off!!!
Saved searches can save you time by quickly referencing commonly searched terms on any topic. Whether you are looking for questions you can answer or hoping to learn about a specific issue, a saved search can help you get the most out of your time o…
Where to go on the main page to find the job listings. How to apply to a job that you are interested in from the list that is featured on our Careers page.

770 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