473,407 Members | 2,306 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,407 software developers and data experts.

TabControl and Inheritance

I am reusing the same controls in a large tab control. Should I be doing the
dispose statement or soemthing else to remove the items from memory? Or will
the framework know to destroy it when it needs to?
Nov 20 '05 #1
5 1034
the framework dous this automaticly. If have problems w this (that would be
a big tab ;) ) you could dispose manually when you no longer need them, this
could free the resources a bit faster, don't expect big differences.
but that to the side i don't realy understand why you would want to do that
in a tab control?

eric

"scorpion53061" <sc****************************@yahoo.com> wrote in message
news:ua**************@TK2MSFTNGP10.phx.gbl...
I am reusing the same controls in a large tab control. Should I be doing the dispose statement or soemthing else to remove the items from memory? Or will the framework know to destroy it when it needs to?

Nov 20 '05 #2
I am not using the dispose statement....

What I am trying to say is that when the user is switching between tabs and
code is instructing it to add certain controls are these controls being
added to the resources being used or is it pulling it from what is already
out there?

What I am tring to avoid is if the user clicks on 15 different tabs are they
going to have consumed resources for 15 "cancel" buttons (create 15
instances) or will it be using the same cancel button resource (only one
instance) it did when it began? If I need to manually dispose of the
"cancel" button instance between tab selection changes how would I do that?
"scorpion53061" <sc****************************@yahoo.com> wrote in message
news:ua**************@TK2MSFTNGP10.phx.gbl...
I am reusing the same controls in a large tab control. Should I be doing the dispose statement or soemthing else to remove the items from memory? Or will the framework know to destroy it when it needs to?

Nov 20 '05 #3
I was using a technique to fill a datagrid with an arraylist that Tucker
taught me and I noticed that when the tab was reloaded their appeared to be
controls from other tabs or possibly the same tab page were present behind
the grid. I started checking to see if every button that was reused was not
being destroyed once it left the tab and was unsure so I thought I would
ask.

But if I know the framework will handle this well I wont worry about it.

"EricJ" <ericRéMo**@ThiSomnipack.be> wrote in message
news:3f**********************@reader1.news.skynet. be...
the framework dous this automaticly. If have problems w this (that would be a big tab ;) ) you could dispose manually when you no longer need them, this could free the resources a bit faster, don't expect big differences.
but that to the side i don't realy understand why you would want to do that in a tab control?

eric

"scorpion53061" <sc****************************@yahoo.com> wrote in message news:ua**************@TK2MSFTNGP10.phx.gbl...
I am reusing the same controls in a large tab control. Should I be doing

the
dispose statement or soemthing else to remove the items from memory? Or

will
the framework know to destroy it when it needs to?


Nov 20 '05 #4
its not impossible that there are some controls left behind other things.
but as long as your app is not acting up i wouldn't worry about it.
for more info you'll probably have to wait for tucker then.

(i know this isn't much help but it's the best i can do atm)

eric

"scorpion53061" <sc****************************@yahoo.com> wrote in message
news:eh**************@TK2MSFTNGP10.phx.gbl...
I was using a technique to fill a datagrid with an arraylist that Tucker
taught me and I noticed that when the tab was reloaded their appeared to be controls from other tabs or possibly the same tab page were present behind
the grid. I started checking to see if every button that was reused was not being destroyed once it left the tab and was unsure so I thought I would
ask.

But if I know the framework will handle this well I wont worry about it.

"EricJ" <ericRéMo**@ThiSomnipack.be> wrote in message
news:3f**********************@reader1.news.skynet. be...
the framework dous this automaticly. If have problems w this (that would

be
a big tab ;) ) you could dispose manually when you no longer need them,

this
could free the resources a bit faster, don't expect big differences.
but that to the side i don't realy understand why you would want to do

that
in a tab control?

eric

"scorpion53061" <sc****************************@yahoo.com> wrote in

message
news:ua**************@TK2MSFTNGP10.phx.gbl...
I am reusing the same controls in a large tab control. Should I be
doing the
dispose statement or soemthing else to remove the items from memory?
Or will
the framework know to destroy it when it needs to?



Nov 20 '05 #5
Oh its no problem........I did some research on tab controls and inheritance
and didnt find a lot of material.

Your input is always cool.

"EricJ" <ericRéMo**@ThiSomnipack.be> wrote in message
news:3f*********************@reader4.news.skynet.b e...
its not impossible that there are some controls left behind other things.
but as long as your app is not acting up i wouldn't worry about it.
for more info you'll probably have to wait for tucker then.

(i know this isn't much help but it's the best i can do atm)

eric

"scorpion53061" <sc****************************@yahoo.com> wrote in message news:eh**************@TK2MSFTNGP10.phx.gbl...
I was using a technique to fill a datagrid with an arraylist that Tucker
taught me and I noticed that when the tab was reloaded their appeared to

be
controls from other tabs or possibly the same tab page were present behind
the grid. I started checking to see if every button that was reused was

not
being destroyed once it left the tab and was unsure so I thought I would
ask.

But if I know the framework will handle this well I wont worry about it.

"EricJ" <ericRéMo**@ThiSomnipack.be> wrote in message
news:3f**********************@reader1.news.skynet. be...
the framework dous this automaticly. If have problems w this (that
would be
a big tab ;) ) you could dispose manually when you no longer need
them, this
could free the resources a bit faster, don't expect big differences.
but that to the side i don't realy understand why you would want to do

that
in a tab control?

eric

"scorpion53061" <sc****************************@yahoo.com> wrote in

message
news:ua**************@TK2MSFTNGP10.phx.gbl...
> I am reusing the same controls in a large tab control. Should I be

doing the
> dispose statement or soemthing else to remove the items from memory? Or will
> the framework know to destroy it when it needs to?
>
>



Nov 20 '05 #6

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

Similar topics

5
by: Tamir Khason | last post by:
How be able to manage more deeply UI of TabControl and TabPage For example - I want to manage border color, change color of TabPage reef, eliminate spaces from both sides of the reef, so I bould...
5
by: meh | last post by:
New to C#... I have a tab page with a handful of controls on it (label, combobox, etc.). Is it possible to "boilerplate a tabPage with the controls "like a MDI childForm" so that adding a new...
1
by: RA | last post by:
Hi 1) I want to create a TabPage class in design mode - how do I do it? What type of project should I use? Is it going to be a custom control? 2) I have a TabControl that I would like to add to...
2
by: Patrick McGuire | last post by:
I want to place a tabControl with almost identical properties on several forms. I think the best way is to define a UserControl that inherits System.Windows.Forms.TabControl, and place all my...
9
by: Michael Turner | last post by:
Hi Guys Having problem with the tab control, I need to set the background color to something different than the standard, I have found code on the web and now can redraw the tabpage buttons so...
5
by: Zadkin | last post by:
Does anyone know, if it's possible to set the orientation of the tabpagebuttons to horizontal instead of vertical when the alignment property of my tabcontrol is set to left or right? Thanks in...
2
by: Simon Verona | last post by:
I have a few hundred forms in my application. All are based on a custom base form class. I decided that I wanted to globally change the look and feel of many of the controls in my application -...
1
by: =?Utf-8?B?QWxleCBLLg==?= | last post by:
Hi all In a Visual Studio 2005 C# project, I have a simplest tabcontrol with two tabpages. When I set tab control's Alignment property to Right, tab texts (captions) disappear. Does anybody...
0
by: bertie78 | last post by:
Hi all, New poster here! I'm having some difficulty updating a tabcontrol cross-threads. The general idea is : the main thread is the owner of the tab control and the form controls. However, due...
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: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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...
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
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,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new...

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.