Solved

Height and width on items on form

Posted on 2014-02-27
5
254 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

Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
How can I use this extension method? 8 36
Car computer reset 4 52
Create XML 5 34
XML & .net 5 21
If you want to move up through the ranks in your technology career, talent and hard work are the bare necessities. But they aren’t enough to make you stand out. Expanding your skills, actively promoting your accomplishments and using promotion st…
Whether you believe the “gig economy,” as it has been dubbed, is the next big economic paradigm shift (https://www.theguardian.com/commentisfree/2015/jul/26/will-we-get-by-gig-economy) or an overstated trend (http://www.wsj.com/articles/proof-of-a-g…
The Bounty Board allows you to request an article or video on any technical topic, or fulfill a bounty request to earn points. Watch this video to learn how to use the Bounty Board to get the content you want, earn points, and browse submitted bount…
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.

760 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

18 Experts available now in Live!

Get 1:1 Help Now