Hi all
I have a Form that is inherited from a main form. On the child form I am
putting 2 panels directly on the form, not in any other controls. If I build
the project, 1 of the panels decides to re-size itself, but the other one
doesn't. Obviously, I don't want the panels re-sizing every time I perform a
build.
Has any-one encountered this behaviour at all? If I look at the code in the
form, the size of the panel is correct, but viewing it in the designer it
goes off the edge of the form cos the size is wrong.
Regards,
Steve. 4 2242
Steve,
Have a look at the properties of the controls.
They may have Docking and Anchoring set.
The Dock property and Anchor property causes the control to hang on to the
edges of its parent control (Form) so it will strech/shrink to suit the form
size.
Doug
"Steve Amey" <stevea@centuri on-ms_RemoveThis_. co.uk> wrote in message
news:%2******** *******@TK2MSFT NGP09.phx.gbl.. . Hi all
I have a Form that is inherited from a main form. On the child form I am putting 2 panels directly on the form, not in any other controls. If I
build the project, 1 of the panels decides to re-size itself, but the other one doesn't. Obviously, I don't want the panels re-sizing every time I perform
a build.
Has any-one encountered this behaviour at all? If I look at the code in
the form, the size of the panel is correct, but viewing it in the designer it goes off the edge of the form cos the size is wrong.
Regards, Steve.
Steve,
Have a look at the properties of the controls.
They may have Docking and Anchoring set.
The Dock property and Anchor property causes the control to hang on to the
edges of its parent control (Form) so it will strech/shrink to suit the form
size.
Doug
"Steve Amey" <stevea@centuri on-ms_RemoveThis_. co.uk> wrote in message
news:%2******** *******@TK2MSFT NGP09.phx.gbl.. . Hi all
I have a Form that is inherited from a main form. On the child form I am putting 2 panels directly on the form, not in any other controls. If I
build the project, 1 of the panels decides to re-size itself, but the other one doesn't. Obviously, I don't want the panels re-sizing every time I perform
a build.
Has any-one encountered this behaviour at all? If I look at the code in
the form, the size of the panel is correct, but viewing it in the designer it goes off the edge of the form cos the size is wrong.
Regards, Steve.
Hi Doug
Sorry, I should have been more descriptive in my first post. I know about
the Anchor and Dock properties and what they're used for, the problem is
that the control is re-sizing after a build, not after re-sizing the form
the control is on. The Anchor and Dock properties are set to None.
Imagine this, you have a form that has 2 Panel controls, you've just sized
them how you want them on the form. The form cannot be re-sized and the
Anchor and Dock properties are None (or Top, Left cos the behaviour after
the build is the same regardless). Everything looks good, you then build the
Assembly, and suddenly 1 of the Panel controls is re-sized so it stretches
beyond the size of the form. If you look at the Properties of the Panel in
the Designer it states the Size is (482, 296) when you want the Size to be
(408, 32), if you look in the Code window the Size of the control is set to
(408, 32) which is what you want it to be. I just can't understand why the
control suddenly decides to re-size on the form after a Build, and it's only
1 control as well, the other one remains fine!
Have you any idea why this is happening??
Regards,
Steve
"Doug Bell" <dug@bigpond> wrote in message
news:%2******** **********@tk2m sftngp13.phx.gb l... Steve,
Have a look at the properties of the controls. They may have Docking and Anchoring set. The Dock property and Anchor property causes the control to hang on to the edges of its parent control (Form) so it will strech/shrink to suit the
form size.
Doug
"Steve Amey" <stevea@centuri on-ms_RemoveThis_. co.uk> wrote in message news:%2******** *******@TK2MSFT NGP09.phx.gbl.. . Hi all
I have a Form that is inherited from a main form. On the child form I am putting 2 panels directly on the form, not in any other controls. If I build the project, 1 of the panels decides to re-size itself, but the other
one doesn't. Obviously, I don't want the panels re-sizing every time I
perform a build.
Has any-one encountered this behaviour at all? If I look at the code in the form, the size of the panel is correct, but viewing it in the designer
it goes off the edge of the form cos the size is wrong.
Regards, Steve.
Hi Doug
Sorry, I should have been more descriptive in my first post. I know about
the Anchor and Dock properties and what they're used for, the problem is
that the control is re-sizing after a build, not after re-sizing the form
the control is on. The Anchor and Dock properties are set to None.
Imagine this, you have a form that has 2 Panel controls, you've just sized
them how you want them on the form. The form cannot be re-sized and the
Anchor and Dock properties are None (or Top, Left cos the behaviour after
the build is the same regardless). Everything looks good, you then build the
Assembly, and suddenly 1 of the Panel controls is re-sized so it stretches
beyond the size of the form. If you look at the Properties of the Panel in
the Designer it states the Size is (482, 296) when you want the Size to be
(408, 32), if you look in the Code window the Size of the control is set to
(408, 32) which is what you want it to be. I just can't understand why the
control suddenly decides to re-size on the form after a Build, and it's only
1 control as well, the other one remains fine!
Have you any idea why this is happening??
Regards,
Steve
"Doug Bell" <dug@bigpond> wrote in message
news:%2******** **********@tk2m sftngp13.phx.gb l... Steve,
Have a look at the properties of the controls. They may have Docking and Anchoring set. The Dock property and Anchor property causes the control to hang on to the edges of its parent control (Form) so it will strech/shrink to suit the
form size.
Doug
"Steve Amey" <stevea@centuri on-ms_RemoveThis_. co.uk> wrote in message news:%2******** *******@TK2MSFT NGP09.phx.gbl.. . Hi all
I have a Form that is inherited from a main form. On the child form I am putting 2 panels directly on the form, not in any other controls. If I build the project, 1 of the panels decides to re-size itself, but the other
one doesn't. Obviously, I don't want the panels re-sizing every time I
perform a build.
Has any-one encountered this behaviour at all? If I look at the code in the form, the size of the panel is correct, but viewing it in the designer
it goes off the edge of the form cos the size is wrong.
Regards, Steve.
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: John Tighe |
last post by:
Changing the max or min size of a form can be in code, but if I do that then
it causes build errors in my application. The build error is: Expression is
a value and therefore cannot be the target of an assignment. If the program
is run in spite of the build errors then we see that the code actually works.
Is there a way to resolve the build error issue?
I am using VB.NET. Microsoft Developement Environment 2002 v7.0.9466. .NET...
|
by: Jeff N |
last post by:
It it possible to change a button's or text box's font size during runtime?
When I try to build my application with this code:
this.ActiveControl.Font.Size = "8.25";
I get this error message:
Property or indexer "System.Drawing.Font.Size' cannot be assigned to -- it
is read only
I can change a button's text property during runtime, but I'd also like to
change the font size as well.
|
by: trinitypete |
last post by:
Hi all,
I have a user control that uses control literal to build
a heading with a link, and a div containing links below.
As the link heading is hit, I want to change the style of
the div, making it visible or not. Yep you guessed it,
expanding tree type functionality.
The header has an onclick event onclick='Doexpandcollapse
|
by: active |
last post by:
It appears to me that if I change the Control's client size the controls
size does not change to agree with the new size.
Does it work like the VB6 ScaleWidth and ScaleHeight?
That is after I change the Clientsize does the display stay the same but the
number of units required to reference a given point changes?
Anyway, it appears to me that If I want to change to size of the control so
that the client size is some value, I need to...
|
by: Dennis |
last post by:
I am trying to set the default design proerties in a control I have derived
from the Panel Class. I thought I'd found how to do it from the MSDN but the
following line doesn't work:
Inherits System.Windows.Forms.Design.ControlDesigner
I get an error saying that the Type is not defined. I cut and pasted all
the imports and line from the MSDN.
Would appreciate any help.
| |
by: RG |
last post by:
For a Windows project in VB.NET 2003:
I need a Calendar that’s much larger than the MonthCalendar control in the
toolbox; it needs to fill the whole screen (at least approximately ). VB
won’t allow me to change the Size Height or Width Properties.
I see that you can size a Calendar control in a Web project all you like;
but I’m creating a Windows application project here.
I see that Size comes from System.Drawing.Size...
|
by: tony |
last post by:
Hello!
This is a rather long mail but it's a very interesting one.
I hope you read it. I have tried several times to get an answer to this mail
but I have
not get any answer saying something like this is a bug or that .NET doesn't
support what I
trying to do.
I hope that one that is is microsoft certified read this because this must
be a bug.
|
by: Hongbo |
last post by:
Hi,
I have a web site built in ASP.Net 1.1 running on production server. It's the version 1.0.
Now I need to build the version 2.0 for this web site. The version 2.0 will be built based
on the code of version 1.0.
Since it take some time to have the version 2.0 ready for production, the code of version 1.0
needs to be kept somewhere for possible bug fix. At this point, the only feasible idea I have is:
1) create a new project for...
|
by: rizwanahmed24 |
last post by:
Hello
i have made a custom control. i have placed a panel on it. I want this
panel to behave just like the normal panel. The problem i was having is
that the panel on my custom control doesnt accept other controls. The
control i drag drop on it becomes the child of my custom control's
parent form and not the child of my custom control. Then i added this
line
""
before my custom control class (i dont know what this line does). Now
|
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: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
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.
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |