Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Height and width on items on form

Posted on 2014-02-27
5
Medium Priority
?
265 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 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

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

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

With the shift in today’s hiring climate (http://blog.experts-exchange.com/ee-blog/5-tips-on-succeeding-in-the-new-gig-economy/?cid=Blog_031816), many companies are choosing to hire freelancers to get projects completed efficiently and inexpensively…
Simulator games are perfect for generating sample realistic data streams, especially for learning data analysis. It is even useful for demoing offerings such as Azure stream analytics, PowerBI etc.
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.
Suggested Courses

916 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