 |
| VB.NET General VB.NET discussions for issues that don't fall into other VB.NET forums. |
Welcome to the p2p.wrox.com Forums.
You are currently viewing the VB.NET section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
|
|
|
|

July 23rd, 2004, 08:45 AM
|
|
Friend of Wrox
|
|
Join Date: Jun 2003
Posts: 1,998
Thanks: 0
Thanked 3 Times in 3 Posts
|
|
Minimize and Maximize
I want to use a Panel to minimize and maximize a group of controls, so that I can hide it. I have a form that is kind of long, and this was the way that I thought would be the best to maximize space. Does anybody know of any controls for this, has anybody done it, or does anybody have any advice?
I was going to use panels and shrink/grow them based on the minimize/maximize operations.
Brian
__________________
Brian
|
|

July 23rd, 2004, 09:01 AM
|
 |
Friend of Wrox
|
|
Join Date: Aug 2003
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts
|
|
What is your target application?
(Come on Brian, you should know better than to leave out the details. ;))
|
|

July 23rd, 2004, 10:12 AM
|
|
Friend of Wrox
|
|
Join Date: Jun 2003
Posts: 1,998
Thanks: 0
Thanked 3 Times in 3 Posts
|
|
Hey,
I must be slipping, that's a Friday for you.
We have a paper form system, which we are taking online (intranet). I want to create a VB.NET backend to process these forms; however, the form is very long, and I don't want to have to scroll up and down the form that much, when there are fields that the reviewer probably won't want to see anyway.
I came up with the idea of putting a group of controls into a panel, then hiding them or displaying them when a minimize or maximize button was clicked.
So in the client/server arena, any ideas?
Brian
|
|

July 23rd, 2004, 01:27 PM
|
 |
Friend of Wrox
|
|
Join Date: Aug 2003
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts
|
|
[u]Good</u>
Server: Use a regular server control button that changes the Visible prop of the asp:panel.
[u]Better</u>
Client: asp:panel will render as a DIV in I.E. Create a client button/link that calls a JS function. Pass the panel's .ClientID to the JS function so the function can retrieve it with document.getElementById("id"). Then check the panel's ".style.display" attribute for "none" and change it to "inline". Else, set to "none". This will change the panel to showing or not and when not, everything after it will slide up. If you want more detail, just ask.
|
|

July 23rd, 2004, 01:31 PM
|
|
Friend of Wrox
|
|
Join Date: Jun 2003
Posts: 1,998
Thanks: 0
Thanked 3 Times in 3 Posts
|
|
Hey,
Sorry, I meant the maximize/minimize in the Windows Forms world. I can't seem to get my requirements straight today.
Sorry about that,
Brian
|
|

July 24th, 2004, 06:18 AM
|
|
Friend of Wrox
|
|
Join Date: Oct 2003
Posts: 336
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
what about setting width,height in percentage so minimizing maximizing will depend on page size
Ahmed Ali
Software Developer
|
|

July 26th, 2004, 07:43 AM
|
|
Friend of Wrox
|
|
Join Date: Jun 2003
Posts: 540
Thanks: 0
Thanked 4 Times in 4 Posts
|
|
I have done something similar using menu items.
How are you going to "minimize" and "maximize" the panels? Are you going to have a group of buttons that control this, menu items, or a different method?
I think what you want is not really maximizing and minimizing. You would be setting the "visible" property to true or false for whichever panel you wanted to show or hide.
You will also have to move up/down whichever panels are below the one you just hid/showed and subtract or add the height of that panel from the forms height. You should be able to write a single function or sub that does this and then implement it for each panel.
I could've sworn that there was a property of the panel or combination of properties in vb that automatically does this for you, but I can't remember what it is.
J
|
|

July 26th, 2004, 07:50 AM
|
|
Friend of Wrox
|
|
Join Date: Jun 2003
Posts: 1,998
Thanks: 0
Thanked 3 Times in 3 Posts
|
|
Hey,
I haven't worked on the process yet, so I'm all open how the minimize/maximize works.
Thanks for the suggestions.
Brian
|
|
 |