Visual Studio 2003 C# Windows:
I have a tree view control as my main menu control down the left side of my
application. This has 2 Parent Nodes on it (Jobs and Employees). beneath
these 2 main functions I have 2 sub functions under each("Add Job", "View
Jobs" and "Add User", "View Users"). I have theses subfunctions grouped in a
TabControl, so there are 2 TabControl objects on my main screen, each with 2
pages on.
When the user first enters the application, all they can see is the Menu
Tree View. When they click a child node in the treeview, it reveals to them
the TabControl for the parent node of the one they selected, and changes the
TabPage to the relevant child node sub function.
My question is this:
Should I just be using the TabControl.Hide() and TabControl.Show() methods
to achieve this functionality i.e When they select a "Add User" I call
tcUsers.Show() then tcJobs.Hide(), and vice versa if they picked "Add Job"
OR
Should I destroy the current TabControl object, and then rebuild the
requested TabControl object??
If so, how do I do this destroy and create process?
Thanks
Steve 5 4457
My suggestion to you is to use the "Visible" property to show or hide the tab
control. Setting Visible to "true" makes the tab control appear and setting
it to "false" makes the control disappear.
--
Jorge L. Matos
"Steve" wrote: Visual Studio 2003 C# Windows:
I have a tree view control as my main menu control down the left side of my application. This has 2 Parent Nodes on it (Jobs and Employees). beneath these 2 main functions I have 2 sub functions under each("Add Job", "View Jobs" and "Add User", "View Users"). I have theses subfunctions grouped in a TabControl, so there are 2 TabControl objects on my main screen, each with 2 pages on.
When the user first enters the application, all they can see is the Menu Tree View. When they click a child node in the treeview, it reveals to them the TabControl for the parent node of the one they selected, and changes the TabPage to the relevant child node sub function.
My question is this:
Should I just be using the TabControl.Hide() and TabControl.Show() methods to achieve this functionality i.e When they select a "Add User" I call tcUsers.Show() then tcJobs.Hide(), and vice versa if they picked "Add Job" OR Should I destroy the current TabControl object, and then rebuild the requested TabControl object??
If so, how do I do this destroy and create process?
Thanks
Steve
what is the beneift of visible over hide() and show(). My main concern with
doing it in this kind of way though was from a memory usage point, when you
hide or make an object not visible, does it stay in memory? Is this a point
worth worrying about?
"Jorge L Matos [MCSD.NET]" wrote: My suggestion to you is to use the "Visible" property to show or hide the tab control. Setting Visible to "true" makes the tab control appear and setting it to "false" makes the control disappear.
-- Jorge L. Matos "Steve" wrote:
Visual Studio 2003 C# Windows:
I have a tree view control as my main menu control down the left side of my application. This has 2 Parent Nodes on it (Jobs and Employees). beneath these 2 main functions I have 2 sub functions under each("Add Job", "View Jobs" and "Add User", "View Users"). I have theses subfunctions grouped in a TabControl, so there are 2 TabControl objects on my main screen, each with 2 pages on.
When the user first enters the application, all they can see is the Menu Tree View. When they click a child node in the treeview, it reveals to them the TabControl for the parent node of the one they selected, and changes the TabPage to the relevant child node sub function.
My question is this:
Should I just be using the TabControl.Hide() and TabControl.Show() methods to achieve this functionality i.e When they select a "Add User" I call tcUsers.Show() then tcJobs.Hide(), and vice versa if they picked "Add Job" OR Should I destroy the current TabControl object, and then rebuild the requested TabControl object??
If so, how do I do this destroy and create process?
Thanks
Steve
there is no hide() or show() method on the microsoft tab control
--
Jorge L. Matos
"Steve" wrote: what is the beneift of visible over hide() and show(). My main concern with doing it in this kind of way though was from a memory usage point, when you hide or make an object not visible, does it stay in memory? Is this a point worth worrying about?
"Jorge L Matos [MCSD.NET]" wrote:
My suggestion to you is to use the "Visible" property to show or hide the tab control. Setting Visible to "true" makes the tab control appear and setting it to "false" makes the control disappear.
-- Jorge L. Matos "Steve" wrote:
Visual Studio 2003 C# Windows:
I have a tree view control as my main menu control down the left side of my application. This has 2 Parent Nodes on it (Jobs and Employees). beneath these 2 main functions I have 2 sub functions under each("Add Job", "View Jobs" and "Add User", "View Users"). I have theses subfunctions grouped in a TabControl, so there are 2 TabControl objects on my main screen, each with 2 pages on.
When the user first enters the application, all they can see is the Menu Tree View. When they click a child node in the treeview, it reveals to them the TabControl for the parent node of the one they selected, and changes the TabPage to the relevant child node sub function.
My question is this:
Should I just be using the TabControl.Hide() and TabControl.Show() methods to achieve this functionality i.e When they select a "Add User" I call tcUsers.Show() then tcJobs.Hide(), and vice versa if they picked "Add Job" OR Should I destroy the current TabControl object, and then rebuild the requested TabControl object??
If so, how do I do this destroy and create process?
Thanks
Steve
there is on mine. Visual Studio .Net 2003, I've used it.
"Jorge L Matos [MCSD.NET]" wrote: there is no hide() or show() method on the microsoft tab control -- Jorge L. Matos "Steve" wrote:
what is the beneift of visible over hide() and show(). My main concern with doing it in this kind of way though was from a memory usage point, when you hide or make an object not visible, does it stay in memory? Is this a point worth worrying about?
"Jorge L Matos [MCSD.NET]" wrote:
My suggestion to you is to use the "Visible" property to show or hide the tab control. Setting Visible to "true" makes the tab control appear and setting it to "false" makes the control disappear.
-- Jorge L. Matos "Steve" wrote:
> Visual Studio 2003 C# Windows: > > I have a tree view control as my main menu control down the left side of my > application. This has 2 Parent Nodes on it (Jobs and Employees). beneath > these 2 main functions I have 2 sub functions under each("Add Job", "View > Jobs" and "Add User", "View Users"). I have theses subfunctions grouped in a > TabControl, so there are 2 TabControl objects on my main screen, each with 2 > pages on. > > When the user first enters the application, all they can see is the Menu > Tree View. When they click a child node in the treeview, it reveals to them > the TabControl for the parent node of the one they selected, and changes the > TabPage to the relevant child node sub function. > > My question is this: > > Should I just be using the TabControl.Hide() and TabControl.Show() methods > to achieve this functionality i.e When they select a "Add User" I call > tcUsers.Show() then tcJobs.Hide(), and vice versa if they picked "Add Job" > OR > Should I destroy the current TabControl object, and then rebuild the > requested TabControl object?? > > If so, how do I do this destroy and create process? > > Thanks > > Steve
You're right, the Show() and Hide() methods are inherited from the Control
base class. I never use those methods since they are equivalent to setting
the Visible property to true or false respectively and I've always used the
Visible property. To answer your question the control remains in memory when
you use the Hide() or Show() methods ( or set the Visibile property to true
or false ). I do not recommend destroying and re-creating objects when you
do not need to do so.
--
Jorge L. Matos
"Steve" wrote: there is on mine. Visual Studio .Net 2003, I've used it.
"Jorge L Matos [MCSD.NET]" wrote:
there is no hide() or show() method on the microsoft tab control -- Jorge L. Matos "Steve" wrote:
what is the beneift of visible over hide() and show(). My main concern with doing it in this kind of way though was from a memory usage point, when you hide or make an object not visible, does it stay in memory? Is this a point worth worrying about?
"Jorge L Matos [MCSD.NET]" wrote:
> My suggestion to you is to use the "Visible" property to show or hide the tab > control. Setting Visible to "true" makes the tab control appear and setting > it to "false" makes the control disappear. > > -- > Jorge L. Matos > > > > "Steve" wrote: > > > Visual Studio 2003 C# Windows: > > > > I have a tree view control as my main menu control down the left side of my > > application. This has 2 Parent Nodes on it (Jobs and Employees). beneath > > these 2 main functions I have 2 sub functions under each("Add Job", "View > > Jobs" and "Add User", "View Users"). I have theses subfunctions grouped in a > > TabControl, so there are 2 TabControl objects on my main screen, each with 2 > > pages on. > > > > When the user first enters the application, all they can see is the Menu > > Tree View. When they click a child node in the treeview, it reveals to them > > the TabControl for the parent node of the one they selected, and changes the > > TabPage to the relevant child node sub function. > > > > My question is this: > > > > Should I just be using the TabControl.Hide() and TabControl.Show() methods > > to achieve this functionality i.e When they select a "Add User" I call > > tcUsers.Show() then tcJobs.Hide(), and vice versa if they picked "Add Job" > > OR > > Should I destroy the current TabControl object, and then rebuild the > > requested TabControl object?? > > > > If so, how do I do this destroy and create process? > > > > Thanks > > > > Steve This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: KathyB |
last post by:
Hi, totally new to the div show/hide thing.
I have some rows in a table. When I first load the page, I only want
to see divs where the divID=ForView. When I load now, I see BOTH
rows...even...
|
by: Robb Gilmore |
last post by:
Hello,
This is probably an easy one, but I have not been able to figure it out so
far. I have a tab control on a windows forms app. Depending on some
business logic, I need to hide/show some...
|
by: itunes66 |
last post by:
how can i do this i already have a function to show/hide elements with
one link but how can i show/hide multiple elements
here is the script
function obj_ref(object)
{
if...
|
by: MLH |
last post by:
Is there a simple way to hide built-in toolbars in A97?
|
by: MAF |
last post by:
How do I hide a tabpage of a given tab control?
//Disable other tabs until item is saved
this.tabPage2.Hide(); //this doesn't work
this.tabPage3.Hide();
this.tabPage4.Hide();
|
by: Jerad Rose |
last post by:
I searched for a while trying to find the answer to this, but to no avail.
I am trying to find the best way (or any way) to dynamically show and hide
groups of TR's. For example, I have a...
|
by: Steve |
last post by:
Visual Studio 2003 C# Windows:
I have a tree view control as my main menu control down the left side of my
application. This has 2 Parent Nodes on it (Jobs and Employees). beneath
these 2 main...
|
by: bridgemanusa |
last post by:
Hi All:
I have a very long page of html that I want to take portions and hide
them in divs, then show when a link is clicked. I have the hide show
part working when the link is clicked, however...
|
by: question |
last post by:
Hi!
I have a requirement where I need to display multiple forms one after
the other like a slide show. These are in the same application.
Basicall on selection of a menu item it should start...
|
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...
|
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...
|
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...
|
by: PapaRatzi |
last post by:
Hello,
I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
|
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...
|
by: Shællîpôpï 09 |
last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
|
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
|
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...
|
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...
| |