473,386 Members | 1,795 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,386 software developers and data experts.

Windows Forms

Just a general question...

When working with a form containing a treeview or similar control... if you
need to show different form fields depending on what is selected in the
treeview then what is the best way to deal with these form controls...?
Like, when they are all visible in the designer it can be absolute chaos...

So how do you guys deal with it? Is there a blank container control (can't
see one) that allows you to drop a screens worth of form controls onto...?
Kinda like the tab control but without the tabs... it's make things easier
to manage... Or do you go to the trouble of setting all form control
properties manually through code making the designer pointless...?

Thanks
Nov 20 '05 #1
6 2293
Cor
Hi

Take a look at "panel" , "groupbox" and to make it complet "statusbar"

For the rest there are a lot of answer.

"User controls", MDI forms, separated forms,
..................................

Cor
Nov 20 '05 #2
That does nothing to answer the question really... I can see what is in
front of my eyes in the toolbox.... what I want to know is how to best
manage when you have many of these on a single form and you need to flick
from one to the next when setting properties etc... once you have more than
a few of these controls on a form you just get lost and it becomes
unmanagable....

As an example, I have a form with a treeview on the left... on the right I
have a multitude of different controls to display depending on what the user
selects in the treeview... how do I manage all the controls on the right...
just plonk them all on top of each other...?

Ta

"Cor" <no*@non.com> wrote in message
news:%2***************@TK2MSFTNGP12.phx.gbl...
Hi

Take a look at "panel" , "groupbox" and to make it complet "statusbar"

For the rest there are a lot of answer.

"User controls", MDI forms, separated forms,
.................................

Cor

Nov 20 '05 #3

Hi,

Thanks for posting in this group.
Windows uses message model to manage all the UI windows(Including
controls). And all the controls have certain events for certain behaviors.
When you do different opertaions on these controls, you can handle related
event, then do the appropriate process.
Because all the controls and UI elements are in the same process,
especially, in the same thread, you can manipulate them freely in the
events.
For example, when you select a certain node of treeview, you can handle the
TreeView_Click event. In this event, you can set the form's text property
as the selected node's text. Or you can add the node's text string into
another listbox.
All these can be done freely.

If I misunderstand you, please feel free to let me know.

Best regards,
Jeffrey Tan
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.

--------------------
| From: <->
| References: <uI**************@TK2MSFTNGP10.phx.gbl>
<#o*************@TK2MSFTNGP12.phx.gbl>
| Subject: Re: Windows Forms
| Date: Fri, 14 Nov 2003 09:25:03 +1100
| Lines: 32
| X-Priority: 3
| X-MSMail-Priority: Normal
| X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
| Message-ID: <eA*************@TK2MSFTNGP11.phx.gbl>
| Newsgroups: microsoft.public.dotnet.languages.vb
| NNTP-Posting-Host: 202-44-189-210.nexnet.net.au 202.44.189.210
| Path: cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTN GP11.phx.gbl
| Xref: cpmsftngxa06.phx.gbl microsoft.public.dotnet.languages.vb:156676
| X-Tomcat-NG: microsoft.public.dotnet.languages.vb
|
| That does nothing to answer the question really... I can see what is in
| front of my eyes in the toolbox.... what I want to know is how to best
| manage when you have many of these on a single form and you need to flick
| from one to the next when setting properties etc... once you have more
than
| a few of these controls on a form you just get lost and it becomes
| unmanagable....
|
| As an example, I have a form with a treeview on the left... on the right I
| have a multitude of different controls to display depending on what the
user
| selects in the treeview... how do I manage all the controls on the
right...
| just plonk them all on top of each other...?
|
| Ta
|
|
|
| "Cor" <no*@non.com> wrote in message
| news:%2***************@TK2MSFTNGP12.phx.gbl...
| > Hi
| >
| > Take a look at "panel" , "groupbox" and to make it complet "statusbar"
| >
| > For the rest there are a lot of answer.
| >
| > "User controls", MDI forms, separated forms,
| > .................................
| >
| > Cor
| >
| >
|
|
|

Nov 20 '05 #4
Yep, you misunderstood big time... but thats ok... I'll try to explain...

I have control overload on my form... I have many panels holding form
controls which are shown or hidden depending on what it selected in the
treeview on the left... I find it hard to navigate to a particular form
control on a particular panel (or whatever container I have used)... it
would be handy to be able to place them on a seperate area of the designer
so they can all be viewed at once, but still appear in the correct place
when the app is run...

Currently to navigate to a panel buried under others I have to use the
dropdown list above the Properties window in the .Net IDE... or click on the
topmost one and select send to back... when you have too many controls on
the designer you can't manage them effectively....

Does that explain the problem I have?

Cheers

""Jeffrey Tan[MSFT]"" <v-*****@online.microsoft.com> wrote in message
news:6o**************@cpmsftngxa06.phx.gbl...

Hi,

Thanks for posting in this group.
Windows uses message model to manage all the UI windows(Including
controls). And all the controls have certain events for certain behaviors.
When you do different opertaions on these controls, you can handle related
event, then do the appropriate process.
Because all the controls and UI elements are in the same process,
especially, in the same thread, you can manipulate them freely in the
events.
For example, when you select a certain node of treeview, you can handle the TreeView_Click event. In this event, you can set the form's text property
as the selected node's text. Or you can add the node's text string into
another listbox.
All these can be done freely.

If I misunderstand you, please feel free to let me know.

Best regards,
Jeffrey Tan
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.

--------------------
| From: <->
| References: <uI**************@TK2MSFTNGP10.phx.gbl>
<#o*************@TK2MSFTNGP12.phx.gbl>
| Subject: Re: Windows Forms
| Date: Fri, 14 Nov 2003 09:25:03 +1100
| Lines: 32
| X-Priority: 3
| X-MSMail-Priority: Normal
| X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
| Message-ID: <eA*************@TK2MSFTNGP11.phx.gbl>
| Newsgroups: microsoft.public.dotnet.languages.vb
| NNTP-Posting-Host: 202-44-189-210.nexnet.net.au 202.44.189.210
| Path: cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTN GP11.phx.gbl
| Xref: cpmsftngxa06.phx.gbl microsoft.public.dotnet.languages.vb:156676
| X-Tomcat-NG: microsoft.public.dotnet.languages.vb
|
| That does nothing to answer the question really... I can see what is in
| front of my eyes in the toolbox.... what I want to know is how to best
| manage when you have many of these on a single form and you need to flick | from one to the next when setting properties etc... once you have more
than
| a few of these controls on a form you just get lost and it becomes
| unmanagable....
|
| As an example, I have a form with a treeview on the left... on the right I | have a multitude of different controls to display depending on what the
user
| selects in the treeview... how do I manage all the controls on the
right...
| just plonk them all on top of each other...?
|
| Ta
|
|
|
| "Cor" <no*@non.com> wrote in message
| news:%2***************@TK2MSFTNGP12.phx.gbl...
| > Hi
| >
| > Take a look at "panel" , "groupbox" and to make it complet "statusbar" | >
| > For the rest there are a lot of answer.
| >
| > "User controls", MDI forms, separated forms,
| > .................................
| >
| > Cor
| >
| >
|
|
|

Nov 20 '05 #5
How about creating them all as docked MDI forms.. Have the treeview in an
mdi form docked to the left hand side, and then just load up the correct
form as an mdi in code docked to the right.

Will that work for you ?

HTH
Simon
<-> wrote in message news:ev**************@TK2MSFTNGP12.phx.gbl...
Yep, you misunderstood big time... but thats ok... I'll try to explain...

I have control overload on my form... I have many panels holding form
controls which are shown or hidden depending on what it selected in the
treeview on the left... I find it hard to navigate to a particular form
control on a particular panel (or whatever container I have used)... it
would be handy to be able to place them on a seperate area of the designer
so they can all be viewed at once, but still appear in the correct place
when the app is run...

Currently to navigate to a panel buried under others I have to use the
dropdown list above the Properties window in the .Net IDE... or click on the topmost one and select send to back... when you have too many controls on
the designer you can't manage them effectively....

Does that explain the problem I have?

Cheers

""Jeffrey Tan[MSFT]"" <v-*****@online.microsoft.com> wrote in message
news:6o**************@cpmsftngxa06.phx.gbl...

Hi,

Thanks for posting in this group.
Windows uses message model to manage all the UI windows(Including
controls). And all the controls have certain events for certain behaviors. When you do different opertaions on these controls, you can handle related event, then do the appropriate process.
Because all the controls and UI elements are in the same process,
especially, in the same thread, you can manipulate them freely in the
events.
For example, when you select a certain node of treeview, you can handle the
TreeView_Click event. In this event, you can set the form's text property as the selected node's text. Or you can add the node's text string into
another listbox.
All these can be done freely.

If I misunderstand you, please feel free to let me know.

Best regards,
Jeffrey Tan
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.
--------------------
| From: <->
| References: <uI**************@TK2MSFTNGP10.phx.gbl>
<#o*************@TK2MSFTNGP12.phx.gbl>
| Subject: Re: Windows Forms
| Date: Fri, 14 Nov 2003 09:25:03 +1100
| Lines: 32
| X-Priority: 3
| X-MSMail-Priority: Normal
| X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
| Message-ID: <eA*************@TK2MSFTNGP11.phx.gbl>
| Newsgroups: microsoft.public.dotnet.languages.vb
| NNTP-Posting-Host: 202-44-189-210.nexnet.net.au 202.44.189.210
| Path: cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTN GP11.phx.gbl
| Xref: cpmsftngxa06.phx.gbl microsoft.public.dotnet.languages.vb:156676
| X-Tomcat-NG: microsoft.public.dotnet.languages.vb
|
| That does nothing to answer the question really... I can see what is in | front of my eyes in the toolbox.... what I want to know is how to best
| manage when you have many of these on a single form and you need to

flick
| from one to the next when setting properties etc... once you have more
than
| a few of these controls on a form you just get lost and it becomes
| unmanagable....
|
| As an example, I have a form with a treeview on the left... on the right I
| have a multitude of different controls to display depending on what

the user
| selects in the treeview... how do I manage all the controls on the
right...
| just plonk them all on top of each other...?
|
| Ta
|
|
|
| "Cor" <no*@non.com> wrote in message
| news:%2***************@TK2MSFTNGP12.phx.gbl...
| > Hi
| >
| > Take a look at "panel" , "groupbox" and to make it complet

"statusbar"
| >
| > For the rest there are a lot of answer.
| >
| > "User controls", MDI forms, separated forms,
| > .................................
| >
| > Cor
| >
| >
|
|
|


Nov 20 '05 #6

Hi,

Sorry for misunderstanding you.
For this issue, I think it is by the design of the form designer, the
control overlapped on another, this depands on the z-order.(Normally, it
depands on the order in the code it being added into the controls
collection).
If you have many panel one on another, I think you can select different
control from the property's dropdownlist to select you wanted control, use
right click menu to set it to front.
Also, you can go to the code editor, to change its z-order(by changing the
order it being added int the controls collection)

Best regards,
Jeffrey Tan
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.

--------------------
| From: <->
| References: <uI**************@TK2MSFTNGP10.phx.gbl>
<#o*************@TK2MSFTNGP12.phx.gbl>
<eA*************@TK2MSFTNGP11.phx.gbl>
<6o**************@cpmsftngxa06.phx.gbl>
| Subject: Re: Windows Forms
| Date: Fri, 14 Nov 2003 19:59:31 +1100
| Lines: 107
| X-Priority: 3
| X-MSMail-Priority: Normal
| X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
| Message-ID: <ev**************@TK2MSFTNGP12.phx.gbl>
| Newsgroups: microsoft.public.dotnet.languages.vb
| NNTP-Posting-Host: 202-44-189-210.nexnet.net.au 202.44.189.210
| Path: cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTN GP12.phx.gbl
| Xref: cpmsftngxa06.phx.gbl microsoft.public.dotnet.languages.vb:156775
| X-Tomcat-NG: microsoft.public.dotnet.languages.vb
|
| Yep, you misunderstood big time... but thats ok... I'll try to explain...
|
| I have control overload on my form... I have many panels holding form
| controls which are shown or hidden depending on what it selected in the
| treeview on the left... I find it hard to navigate to a particular form
| control on a particular panel (or whatever container I have used)... it
| would be handy to be able to place them on a seperate area of the designer
| so they can all be viewed at once, but still appear in the correct place
| when the app is run...
|
| Currently to navigate to a panel buried under others I have to use the
| dropdown list above the Properties window in the .Net IDE... or click on
the
| topmost one and select send to back... when you have too many controls on
| the designer you can't manage them effectively....
|
| Does that explain the problem I have?
|
| Cheers
|
| ""Jeffrey Tan[MSFT]"" <v-*****@online.microsoft.com> wrote in message
| news:6o**************@cpmsftngxa06.phx.gbl...
| >
| > Hi,
| >
| > Thanks for posting in this group.
| > Windows uses message model to manage all the UI windows(Including
| > controls). And all the controls have certain events for certain
behaviors.
| > When you do different opertaions on these controls, you can handle
related
| > event, then do the appropriate process.
| > Because all the controls and UI elements are in the same process,
| > especially, in the same thread, you can manipulate them freely in the
| > events.
| > For example, when you select a certain node of treeview, you can handle
| the
| > TreeView_Click event. In this event, you can set the form's text
property
| > as the selected node's text. Or you can add the node's text string into
| > another listbox.
| > All these can be done freely.
| >
| > If I misunderstand you, please feel free to let me know.
| >
| > Best regards,
| > Jeffrey Tan
| > Microsoft Online Partner Support
| > Get Secure! - www.microsoft.com/security
| > This posting is provided "as is" with no warranties and confers no
rights.
| >
| > --------------------
| > | From: <->
| > | References: <uI**************@TK2MSFTNGP10.phx.gbl>
| > <#o*************@TK2MSFTNGP12.phx.gbl>
| > | Subject: Re: Windows Forms
| > | Date: Fri, 14 Nov 2003 09:25:03 +1100
| > | Lines: 32
| > | X-Priority: 3
| > | X-MSMail-Priority: Normal
| > | X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
| > | X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
| > | Message-ID: <eA*************@TK2MSFTNGP11.phx.gbl>
| > | Newsgroups: microsoft.public.dotnet.languages.vb
| > | NNTP-Posting-Host: 202-44-189-210.nexnet.net.au 202.44.189.210
| > | Path: cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTN GP11.phx.gbl
| > | Xref: cpmsftngxa06.phx.gbl microsoft.public.dotnet.languages.vb:156676
| > | X-Tomcat-NG: microsoft.public.dotnet.languages.vb
| > |
| > | That does nothing to answer the question really... I can see what is
in
| > | front of my eyes in the toolbox.... what I want to know is how to best
| > | manage when you have many of these on a single form and you need to
| flick
| > | from one to the next when setting properties etc... once you have more
| > than
| > | a few of these controls on a form you just get lost and it becomes
| > | unmanagable....
| > |
| > | As an example, I have a form with a treeview on the left... on the
right
| I
| > | have a multitude of different controls to display depending on what
the
| > user
| > | selects in the treeview... how do I manage all the controls on the
| > right...
| > | just plonk them all on top of each other...?
| > |
| > | Ta
| > |
| > |
| > |
| > | "Cor" <no*@non.com> wrote in message
| > | news:%2***************@TK2MSFTNGP12.phx.gbl...
| > | > Hi
| > | >
| > | > Take a look at "panel" , "groupbox" and to make it complet
| "statusbar"
| > | >
| > | > For the rest there are a lot of answer.
| > | >
| > | > "User controls", MDI forms, separated forms,
| > | > .................................
| > | >
| > | > Cor
| > | >
| > | >
| > |
| > |
| > |
| >
|
|
|

Nov 20 '05 #7

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

Similar topics

2
by: Greg Bacchus | last post by:
Hi, I'm getting an exception that really has me stumped. It's sporadic at best, it's only happened a handful of times. This particular time it happened when the user pressed 'Alt-S' to save the...
15
by: Wiktor Zychla | last post by:
today we've found a critical issue regarding the ListView from Windows.Forms. it was confirmed on several machines with Win2K and XP. here's the problem: create a ListView with about 50000 rows....
5
by: david | last post by:
I have developed my web service with a domain name of my computer name and wwwroot directory. I also developed a client of windows form application. It works locally (i.e. in the same machine). ...
7
by: Tyler Foreman | last post by:
Hello, I have a strange problem that occurs every so often in my application. It usually takes place when I hide one form and activate another. What happens is I get the following exception:...
1
by: Scott Davies | last post by:
Hi, I'm looking for some help on a small program that I'm trying to develop in VB.NET. I'm having trouble getting the code that I've written to work, can anyone shed some light as to where I'm...
0
by: Scott Davies | last post by:
Hi, I'm looking for some help on a small program that I'm trying to develop in VB.NET. The program I'm trying to develop needs to be able to do the following: - Select remote server -...
4
by: Rod Gill | last post by:
Hi, I have a form that when opened in the designer appears of the screen. The form selector can't be dragged (or resized) and if I scroll right and down to centralise it the form simply jumps...
4
by: tshad | last post by:
What would be a good way to check programmatically whether a service was running? We have a service that dies periodically and I need to check to see if this service is running. I know how to...
1
by: mfunkmann | last post by:
Hi, I recently got an error and I don't know how to fix it: Error 1 'System.Data.DataColumn' does not contain a definition for 'Windows' C:\c#\CsharpPRO\Form1.Designer.cs 304 77 CsharpPRO I...
21
by: Dan Tallent | last post by:
In my application I have a form (Customer) that I want to be able to open multiple copies at once. Within this form I have other forms that can be opened. Example: ZipCode. When the user enters...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
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,...

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.