I need to associate the elements of a bool type matrix with the state of a checkbox from an array that i've created. For example: if the element checkBoxMatrix[3,4] is checked then the the element in boolMatrix[3,4] is changed to true and if it is unchecked it is changed to false. However; this is not my problem.
The size of the matrices aren't fixed. I dynamically allocate the number of rows and columns.It works fine when the ranges are small, but when these ranges become kind of big, for example 100 by 100, the program stops responding.
I would like to stick with the array of checkboxes since I'm kind of new with C#, but creating a table (like in Exel, if there is a way) on the form would suffice.
Any and all ideas are welcome...
3 1567
I need to associate the elements of a bool type matrix with the state of a checkbox from an array that i've created. For example: if the element checkBoxMatrix[3,4] is checked then the the element in boolMatrix[3,4] is changed to true and if it is unchecked it is changed to false. However; this is not my problem.
The size of the matrices aren't fixed. I dynamically allocate the number of rows and columns.It works fine when the ranges are small, but when these ranges become kind of big, for example 100 by 100, the program stops responding.
I would like to stick with the array of checkboxes since I'm kind of new with C#, but creating a table (like in Exel, if there is a way) on the form would suffice.
Any and all ideas are welcome...
Could you please post the code that you are using to dynamically allocate the memory for your arrays?
Are you sure that you are properly cleaning up the memory once you are finished with it?
(Is this a web application or desktop application?)
****This is the code where I create the array: -
this.ActCondState=new System.Windows.Forms.CheckBox[this.ruleType.GetNumOfRules(),this.ruleType.GetNumOfAct() + this.ruleType.GetNumOfCond()];
-
-
j=40;
-
-
this.checkBoxDimension1 = this.ruleType.GetNumOfRules();
-
this.checkBoxDimension2 = this.ruleType.GetNumOfAct() + this.ruleType.GetNumOfCond();
-
-
//Creates the checkboxes which maintain the state of each entry in the decision matrix
-
for(k=0;k<this.checkBoxDimension1;++k)
-
{
-
int o=30;
-
for(l=0;l<this.checkBoxDimension2;++l)
-
{
-
this.ActCondState[k,l] = new System.Windows.Forms.CheckBox();
-
if(this.ruleType.GetDecisionMatrixElem(k,l) == true)
-
this.ActCondState[k,l].Checked =true;
-
this.ActCondState[k,l].CheckStateChanged += new EventHandler
-
mainFrm_CheckStateChanged);
-
this.ActCondState[k,l].Location = new System.Drawing.Point(j,o);
-
this.ActCondState[k,l].Size =new System.Drawing.Size(30,20);
-
this.ActCondState[k,l].Name = "ActCondState"+k+"_"+l;
-
this.RuleTypePopulateTab.Controls.AddRange(new
-
System.Windows.Forms.Control[] {this.ActCondState[k,l]});
-
o+=20;
-
}
-
j+=40;
-
}
-
-
//****This is the code where i dispose of each individual checkbox:
-
-
if(ActCondState != null)
-
{
-
for(k=0;k<this.checkBoxDimension1;++k)
-
for(l=0;l<this.checkBoxDimension2;++l)
-
{
-
this.ActCondState[k,l].Dispose();
-
}
-
}
-
Thank you for your response
Oh, and its a desktop application.
Sign in to post your reply or Sign up for a free account.
Similar topics
by: claudel |
last post by:
Hi
I have a newb PHP/Javascript question regarding checkbox processing
I'm not sure which area it falls into so I crossposted to comp.lang.php
and comp.lang.javascript.
I'm trying to...
|
by: Rodney King |
last post by:
Hi,
I have developed an ASP page which dynamically displays a list of
checkbox options based on a SQL statement. Here is my code:
<div style="OVERFLOW:auto; Height: 150px">
<table>
<%
dim...
|
by: Michael Bourgon |
last post by:
I've been having the same problem for 2 weeks now. If anyone has any
ideas, I'd love to hear them. We are using both SQL and Windows
Authentication. I was running a Profiler Trace at the time,...
|
by: Piotr |
last post by:
how can I read (in alert for example) array index number of checked
checkbox?
I have:
<input type="checkbox" id="id_number" name="check" value="1"
onclick="show()"/>
<input type="checkbox"...
|
by: Nimit |
last post by:
Hi, I wasn't sure which forum this post belongs to, so I've posted it
to a couple forums that I thought may be appropriate.
In giving me advice, please consider me a beginner. Below is a synopsis...
|
by: Craig Andrews |
last post by:
Hello,
How do I access HTML CheckBoxs in the codebehind section of an ASP.NET
program?
In the old Interdev days one would:
For i = 1 to Request.Form("CheckBox").Count
if...
|
by: gce |
last post by:
What happens :
When I first press the button, I get an listbox1 with a,b,c (correct:
because of the
addtoa(1, "a")
addtoa(2, "b")
addtoa(3, "c")
When I check the checkbox, the eventhandler...
|
by: Sluggoman |
last post by:
Hi all,
Am floundering through a course in which C was not a pre-req, but the
assignment is in C - If someone could point out where I am going way
off the rails, I'd apprecciate it. Please be...
|
by: Sunny |
last post by:
Hi, Can someone tell me, How to redefine array or make array empty or
null.
Here what I am trying to do.
var temp = new Array();
for(i=0; i <=outstring.length-1; i++) {
temp =...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
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...
|
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...
|
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: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
|
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...
|
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,...
|
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...
| |