Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Height and width on items on form

Posted on 2014-02-27
5
Medium Priority
?
264 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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 86

Accepted Solution

by:
Mike Tomlinson earned 2000 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

Application Discovery Service in AWS

In the era of the cloud, customers migrating away from their existing on-premise infrastructure. This requires lots of planning, strategies, and effort to identify their existing resources and determine how best to migrate.  Datacenter migrations happen in four phases -

Question has a verified solution.

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

Originally published Entrepreneur.com Booming numbers of freelancing professionals are changing the face of work. In the United States alone last year, the number of workers freelancing grew from 700,000 to 54 million, according to a Freelancers’…
This story has been written with permission from the scammed victim, a valued client of mine – identity protected by request.
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.

688 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