I have two group boxes containing labels and textboxes that are next too
each other. I want the group boxes and labels and textboxes to remain
portionally the same as the form is resized.
I've set the group boxes to be anchored left, right, top, and bottom, the
labels to be left, right, top, and the textboxes to be anchored left,
right,top, and bottom.
But when I try to manually resize the form, the group boxes overlap. How do
I get the group boxes and contents to stay properly the same while growing?
Thanks 3 1711
A little more information
The group boxes overlap in the middle when resizing in either direction.
"Steve" <s.*****@comcas t.netwrote in message
news:%2******** ********@TK2MSF TNGP02.phx.gbl. ..
I have two group boxes containing labels and textboxes that are next too
each other. I want the group boxes and labels and textboxes to remain
portionally the same as the form is resized.
I've set the group boxes to be anchored left, right, top, and bottom, the
labels to be left, right, top, and the textboxes to be anchored left,
right,top, and bottom.
But when I try to manually resize the form, the group boxes overlap. How
do
I get the group boxes and contents to stay properly the same while
growing?
>
Thanks
But when I try to manually resize the form, the group boxes overlap. How
do
I get the group boxes and contents to stay properly the same while
growing?
Don't anchor both left groupbox to the right side and the right groupbox to
the left side. As this will cause them to overlap when the form resizes. As
each will remain fixed to the opposite side...
Consider:
- anchoring only one of them
- using a TableLayoutPane l (VS 2005) http://msdn2.microsoft.com/en-us/lib...youtpanel.aspx
Where you anchor each groupbox into a cell of the TableLayoutPane l. Each
cell would have a width of 50%.
-using the Form.Layout event http://msdn2.microsoft.com/en-us/lib...ol.layout.aspx
Something like (which needs some more work):
Private Sub MainForm_Layout (ByVal sender As Object, ByVal e As
System.Windows. Forms.LayoutEve ntArgs) Handles Me.Layout
Dim width As Integer = Me.ClientSize.W idth \ 2
GroupBox3.Width = (width - Me.GroupBox3.Le ft -
Me.GroupBox3.Pa dding.Right)
GroupBox4.Width = (width - Me.GroupBox4.Pa dding.Horizonta l)
GroupBox4.Left = Me.ClientRectan gle.Right - GroupBox4.Width -
Me.GroupBox4.Pa dding.Right
End Sub
--
Hope this helps
Jay B. Harlow
..NET Application Architect, Enthusiast, & Evangelist
T.S. Bradley - http://www.tsbradley.net
"Steve" <s.*****@comcas t.netwrote in message
news:%2******** ********@TK2MSF TNGP02.phx.gbl. ..
>I have two group boxes containing labels and textboxes that are next too
each other. I want the group boxes and labels and textboxes to remain
portionally the same as the form is resized.
I've set the group boxes to be anchored left, right, top, and bottom, the
labels to be left, right, top, and the textboxes to be anchored left,
right,top, and bottom.
But when I try to manually resize the form, the group boxes overlap. How
do
I get the group boxes and contents to stay properly the same while
growing?
Thanks
Steve,
This means in my idea that you have only put some anchors on the outer side.
See anchoring as with a ship. If they have no anchors in the middle the
possibilitiy exist that they hit each other when the sea is lowering.
Cor
"Steve" <s.*****@comcas t.netschreef in bericht
news:%2******** ********@TK2MSF TNGP02.phx.gbl. ..
>I have two group boxes containing labels and textboxes that are next too
each other. I want the group boxes and labels and textboxes to remain
portionally the same as the form is resized.
I've set the group boxes to be anchored left, right, top, and bottom, the
labels to be left, right, top, and the textboxes to be anchored left,
right,top, and bottom.
But when I try to manually resize the form, the group boxes overlap. How
do
I get the group boxes and contents to stay properly the same while
growing?
Thanks
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Lumpierbritches |
last post by:
Thank you in advance. Is there a way to anchor a child form say beside the
parent form, when that data is needed?
Michael
|
by: Brian Conway |
last post by:
I have a webform that I have a datagrid on that I want a button at the
bottom of the grid to maintain its position with the datagrid, if the grid
grows large then button needs to move down with it, and if it is smaller it
needs to move up. Everything regarding anchoring that I have found is with
Windows Forms, is there any way to do this with a Web Form?
|
by: Mad Joe |
last post by:
Hi!
I have a window form that contains 4 elements (2x2) on one panel.
Those 4 elements are GroupBoxes of the exact same size, sorted like this:
groupBox1 groupBox2
groupBox3 groupBox4
While resizing a Form window manually, I would like to resize
automatically each groupBox by keeping the same ratio:
Width of each groupBox = 50% of Panel-width
|
by: Ahmed |
last post by:
Hello everyone,
I am designing an application to work with two screen resolutions,
1024x 768 and 800x600. If the user is using a higher resolution the
form should have the same size as 1024x768 screen
I started building the application in 1024x 768 form size but
everything got screwed up when I used the 800x600 screen. So, I decided
to set the size of the form in the design mode to 800x600. The screen
draws fine but I have a lot of...
|
by: batista |
last post by:
Hello All,
I want to anchor my control to the browser window, just like the anchor
property in windows forms.
Like if i resize my browser window the webgrid should also resize
itself.
How could I do this in web forms,
Any suggestions....
| |
by: daveryan78 |
last post by:
Hi all,
I've been getting a strange problem with anchoring on my forms. I have
a form where I put on a tabControl. I set it's anchoring to Top,
Bottom, Left, Right. I put a number of tabPages on to the control. On
the first tab I put textBoxes and comboBoxes. I set all their widths to
655 and their anchoring to Top, Left, Right.
When I run the app, the form appears and all the textboxes and
comboBoxes have truncated from the right, the...
|
by: Greg |
last post by:
This works properly:
1. Create a new Form and set it's size to 229, 474.
2. Drag a Panel to the form and set the following properties:
Size = 216, 438
Location = 3,1
Anchor = Top, Bottom
3. Add a PictureBox control to the top of the panel and set the following
|
by: marfi95 |
last post by:
My application consists of basically a treeview on the left side,
along with a panel control that takes up the right side. When nodes
are clicked on the left, the data on the right side of the panel is
changed based on that type.
What I'm using are usercontrols, so I can do the visual design of them
in a separate window. when the node is clicked, I assign the parent
of the usercontrol to the panel control that is on the right side of...
|
by: sklett |
last post by:
I've read several articles/blogs/threads about anchoring/docking child
controls in a FlowLayoutPanel. It sounds like it *should* work, but I can't
get it to work for the life of me.
Jon Skeet: I've created a short and complete sample to illustrate the
problem. Beat you to it! :0)
I would really appreciate if anyone could take a look at this and tell me
what the magic trick is to make this work. All I want is to have the child...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
| |
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
| |
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |