473,326 Members | 2,125 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,326 software developers and data experts.

Expanding user controls

I have a treeview and a panel inside of a form. Depending on what item in
the treeview is clicked, different user controls get loaded into the panel.
If the form is resized, or maximized the panel stretches with the form, but
the user controls stay static. Is there a way I can stretch the user
control forms automatically (as well as reposition all objects on the user
controls) when the size of the panel changes? Thanks for any advice.

-Jason
Nov 20 '05 #1
2 1226
I'm not sure if this is the best way to do it, but am I right in saying I
could just do something like:

Panel1.Controls.Item(0).Size = New Size(Panel1.Width, Panel1.Height)

in the main form, and handle the controls contained within the user controls
through each of the separate user control's resize event?

Is there a better way, or is that pretty much standard?

-Jason
"OpticTygre" <op********@adelphia.net> wrote in message
news:uv********************@adelphia.com...
I have a treeview and a panel inside of a form. Depending on what item in
the treeview is clicked, different user controls get loaded into the panel. If the form is resized, or maximized the panel stretches with the form, but the user controls stay static. Is there a way I can stretch the user
control forms automatically (as well as reposition all objects on the user
controls) when the size of the panel changes? Thanks for any advice.

-Jason

Nov 20 '05 #2

"OpticTygre" <op********@adelphia.net> wrote in message
news:rr********************@adelphia.com...
I'm not sure if this is the best way to do it, but am I right in saying I
could just do something like:

Panel1.Controls.Item(0).Size = New Size(Panel1.Width, Panel1.Height)
Why not just anchor the UserControl to all sides of the Panel?
in the main form, and handle the controls contained within the user controls through each of the separate user control's resize event?


This is definitely the way to go for controls in the UserControl itself.
Nov 20 '05 #3

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

Similar topics

4
by: David | last post by:
It's sad to say, but when using the AOL web site, like to send an email, they have a nifty capability such that when a window is resized, the textarea where the message is input expands not only...
1
by: Bhiksha Raj | last post by:
Hi, I created an expanding menu on one of the frames in my webpage using code I got from http://www.dynamicdrive.com/dynamicindex1/navigate1.htm I have embedded the code (with minor...
2
by: Deano | last post by:
I have a textbox on a report that show the contents of a note field which stores Memo data. Quite alot of text can be typed by the user here but if it exceeds a certain amount the textbox does not...
1
by: Robert Howells | last post by:
Perhaps I'm just too new at this to pull it off, or perhaps it's just bad architecture. I'd appreciate some feedback on the the wisdom (or lack thereof) in attempting the following: I'm not new...
6
by: Jack | last post by:
Hello, I would like some advice on how to disable the behavior of treeviews to expand and collapse when double clicked upon, but still allow the user to use the plus and minus on each node. ...
28
by: braver | last post by:
I need a magical expanding hash with the following properties: * it creates all intermediate keys meh = 1 -- works even if meh didn't exist before * allows pushing new elements to leaves...
2
by: Number 11950 - GPEMC! Replace number with 11950 | last post by:
Is there a control, class, or technique that will allow me to add features from another control to an existing control. For example is it possible to take the carat position (in text) or SelStart &...
13
Chrisjc
by: Chrisjc | last post by:
I am in need of an expanding and collapsing code… The goal is To be able to click a PICTURE IMAGE and expand to show information Reason for this is I have 3 TABLES of information of about ...
1
by: Rahsaan Page | last post by:
Hello Everybody, I am trying to write a file Explorer program in Java, i go the Frame, Basic Menu and Tree going. But now i have the C: listed and i need some help expanding and collaping the...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...

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.