Newbie: Help with expanding a form at runtime

  • Thread starter Thread starter steve
  • Start date Start date
S

steve

-- I`m reposting this in case people missed it due to the weekend, apologies
if i break any rules
--actually a friend showed me how to do it in VB6, but even then i don't
like the solution: he changes the height of the form at ----runtime so that
more stuff appears at the bottom. Is there a cleaner way to do it (in
vb.net)

Hi,
can someone guide me to some tutorials/keyword search regarding the
following:

I have a main form with let's say a couple of tab choices. And for example,
the user fills up some info (begin-end dates, a couple of radio buttons,
etc.) hits a button (e.g. SEND) :
|-------|
------|---tab-|---------------------|
| |
| () |
| () |
| .......... etc .... |
| |
| |
| [send] |
| |
-----------------------------------

I want the results (let's say from querying a database) to appear in the
bottom part as if the form is expanded (for this *specific* tab) , something
like this:

|-------|
------|---tab-|---------------------|
| |
| () |
| () |
| .......... etc .... |
| |
| |
| [send] |
| |
-----------------------------------
| .................. ..... .... .... |
| .................. .... ..... ..... |
| . |
| . |
| etc. |
 
If this were a web page a panel would be the answer (as was suggested
before). But since it's not, I think you are going to have to resize the
tabcontrol, and probably the form itself if it is not already tall enough.

You can't have individual tabs be different heights. But you could change
the height of the entire tabcontrol when you click on the different tabs
(giving the effect).

Greg
 
I've been playing around with using a Panel control with AutoScroll set to
True. Basically when you click the button the panel becomes visible. If all
the controls in the panel don't fit, a scroll bar appears. This avoid
having to resize the form.

I've attached an example. Might give you some ideas.

Greg

Greg Burns said:
If this were a web page a panel would be the answer (as was suggested
before). But since it's not, I think you are going to have to resize the
tabcontrol, and probably the form itself if it is not already tall enough.

You can't have individual tabs be different heights. But you could change
the height of the entire tabcontrol when you click on the different tabs
(giving the effect).

Greg


steve said:
-- I`m reposting this in case people missed it due to the weekend, apologies
if i break any rules
--actually a friend showed me how to do it in VB6, but even then i don't
like the solution: he changes the height of the form at ----runtime so that
more stuff appears at the bottom. Is there a cleaner way to do it (in
vb.net)

Hi,
can someone guide me to some tutorials/keyword search regarding the
following:

I have a main form with let's say a couple of tab choices. And for example,
the user fills up some info (begin-end dates, a couple of radio buttons,
etc.) hits a button (e.g. SEND) :
|-------|
------|---tab-|---------------------|
| |
| () |
| () |
| .......... etc .... |
| |
| |
| [send] |
| |
-----------------------------------

I want the results (let's say from querying a database) to appear in the
bottom part as if the form is expanded (for this *specific* tab) , something
like this:

|-------|
------|---tab-|---------------------|
| |
| () |
| () |
| .......... etc .... |
| |
| |
| [send] |
| |
-----------------------------------
| .................. ..... .... .... |
| .................. .... ..... ..... |
| . |
| . |
| etc. |
 
So I guess there is no other way other than dynamically expanding the form?
hmmm.......

How about i add a second form at the botom of the first in such a way that
they both have the same width and the top-left corner of the second is
dynamically made equal to the bottom left of the original ???
(but then again if the user pushes the form low in the screen the second one
will not appear ....)
 
-- I`m reposting this in case people missed it due to the weekend, apologies
if i break any rules
--actually a friend showed me how to do it in VB6, but even then i don't
like the solution: he changes the height of the form at ----runtime so that
more stuff appears at the bottom. Is there a cleaner way to do it (in
vb.net)

Surprise: this is how virtually every Windows program every written handles
expanding forms. What don't you like about this approach?
 
Back
Top