473,471 Members | 2,017 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Usercontrol resize?

Dear friends

I have placed a Listbox on a Usercontrol. How do I move the Listbox to upper
left corner and make the listbox same size as usercontrol when resizing
usercontrol in designtime?

Regards Able
Nov 20 '05 #1
2 2050
* "Able" <ab**************@portalen.no> scripsit:
I have placed a Listbox on a Usercontrol. How do I move the Listbox to upper
left corner and make the listbox same size as usercontrol when resizing
usercontrol in designtime?


Anchor the control to the usercontrol's borders ('Anchor' property).

--
Herfried K. Wagner
MVP · VB Classic, VB.NET
<http://www.mvps.org/dotnet>
Nov 20 '05 #2
"Able" <ab**************@portalen.no> schrieb
I have placed a Listbox on a Usercontrol. How do I move the Listbox
to upper left corner and make the listbox same size as usercontrol
when resizing usercontrol in designtime?


Have a look at the Dock property. To fully fill the Usercontrol, set it to
"Fill". The Anchor property might also be useful.

If there are no other controls in the Usercontrol and the Listbox always
totally fills the control, you might consider deriving your own Listbox from
the Listbox class instead of creating a Usercontrol.
--
Armin

Nov 20 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Steve Long | last post by:
Hello, I'm trying to write my first UserControl in C#. It's pretty simple so far, just the design surface and two treeview controls. The problem is that the resize event of the UserControl isn't...
2
by: Jaikumar | last post by:
Hi, 1) I have created one windows application, In the main form ( form1) i have added one usercontrol (usercontrol1), In that user control i am drawing one image. 2) In the UserControl1 i am...
1
by: al | last post by:
Greetings, I included a UserControl (UC)on webpage. It works fine except when I change document direction to 'rtl', UC doesn't resize with the rest of document. It just disappears behinde rest...
1
by: **Developer** | last post by:
I'm geting a lot of flashing while resizing a form containing one of my usercontrols that is docked fill. This doesn't alway happen, depends on what is visible on the control. Is there some...
2
by: Rene Sørensen | last post by:
In VS 2005 I'm trying to create a usercontrol, but I have some problems with it right now I can't figure out how to fix. The size of my usercontrol is "Size 574; 619" I have anchored all controls...
0
by: Joe | last post by:
Anyone have any experience using custom snaplines? I have a usercontrol that acts as a container for several child controls. I wrote an inherited ControlDesigner to handle some custom actions...
3
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...
1
by: Jeff | last post by:
..NET 2.0 I've added a custom UserControl onto a form. When I resize the form the UserControl doesn't resize. What property do I need to set on the UserControl so it automatically resizes if the...
4
by: Hamed | last post by:
Hello I have a UserControl sized to 100; 200 When I drop it in my form the initial size is 100;200 (as I prefer). Then I decided to change the size of my UserControl to 200;200 but although I...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
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,...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
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...
1
isladogs
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...
0
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...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
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 ...
0
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.