Wrox Programmer Forums
|
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
 
Old July 23rd, 2004, 08:45 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 1,998
Thanks: 0
Thanked 3 Times in 3 Posts
Default 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
 
Old July 23rd, 2004, 09:01 AM
planoie's Avatar
Friend of Wrox
 
Join Date: Aug 2003
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts
Default

What is your target application?

(Come on Brian, you should know better than to leave out the details. ;))
 
Old July 23rd, 2004, 10:12 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 1,998
Thanks: 0
Thanked 3 Times in 3 Posts
Default

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
 
Old July 23rd, 2004, 01:27 PM
planoie's Avatar
Friend of Wrox
 
Join Date: Aug 2003
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts
Default

[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.
 
Old July 23rd, 2004, 01:31 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 1,998
Thanks: 0
Thanked 3 Times in 3 Posts
Default

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
 
Old July 24th, 2004, 06:18 AM
Friend of Wrox
 
Join Date: Oct 2003
Posts: 336
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to alyeng2000
Default

what about setting width,height in percentage so minimizing maximizing will depend on page size

Ahmed Ali
Software Developer
 
Old July 26th, 2004, 07:43 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 540
Thanks: 0
Thanked 4 Times in 4 Posts
Default

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
 
Old July 26th, 2004, 07:50 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 1,998
Thanks: 0
Thanked 3 Times in 3 Posts
Default

Hey,

I haven't worked on the process yet, so I'm all open how the minimize/maximize works.

Thanks for the suggestions.

Brian





Similar Threads
Thread Thread Starter Forum Replies Last Post
When I minimize my form and then maximize it again ehsemsar Crystal Reports 0 January 3rd, 2007 08:39 AM
Maximize the JInternalFrame rajavva Java GUI 1 September 21st, 2006 11:30 AM
How to maximize the window v_savkare Javascript 1 October 3rd, 2005 05:09 AM
How to maximize the window v_savkare Javascript 1 September 28th, 2005 01:43 AM
maximize form rupen Access VBA 1 May 27th, 2005 12:06 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.