|
-
Apr 6th, 2007, 06:05 PM
#1
Thread Starter
Frenzied Member
[RESOLVED] adding CheckBox at runtime
how can i add an array of a 3 CheckBoxs at the run time in the pocket pc?
i try this:
Code:
CheckBox[] addCheckBox = new CheckBox[3];
Form1 frm = new Form1();
for( int i = 0; i< 3 ; i++)
{
addCheckBox[i] = new CheckBox();
addCheckBox[i].Text = "hi vbforums";
frm.Controls.Add(addCheckBox[i]);
addCheckBox[i] = new CheckBox();
}
but this wasnt good
any one have any ideas
thanks alot
You Don't Have to Rate Me.
I'm Not a Civilized Man I'm the Civilization it self
White or Black, Living or Dieing and 0 or 1 that's MY life
iam an Object in Object Oriented Life
my blog : http://refateid.blogspot.com/
twitter : @avrail
010011000111010101110110001000000100110101111001001000000101000001100011 
-
Apr 6th, 2007, 08:57 PM
#2
Re: adding CheckBox at runtime
Search the .NET section on adding controls at runtime. I believe the technique is the same for the CF as for the full .NET, and I know there are LOTS of theads on that over in .NET.
My usual boring signature: Nothing
 
-
Apr 8th, 2007, 03:05 AM
#3
Frenzied Member
Re: adding CheckBox at runtime
Hi,
You are nearly there. You need to position it, size it, and make it visible for it to appear
Pete
-
Apr 8th, 2007, 11:19 AM
#4
Re: adding CheckBox at runtime
You may also want to add handlers, though, which is what those other threads would walk you through.
My usual boring signature: Nothing
 
-
Apr 8th, 2007, 04:47 PM
#5
Thread Starter
Frenzied Member
Re: adding CheckBox at runtime
well, it workes fine now
i can added all my check boxes,
but about the checkbox.text can i make this text multi-line text
thanks alot
You Don't Have to Rate Me.
I'm Not a Civilized Man I'm the Civilization it self
White or Black, Living or Dieing and 0 or 1 that's MY life
iam an Object in Object Oriented Life
my blog : http://refateid.blogspot.com/
twitter : @avrail
010011000111010101110110001000000100110101111001001000000101000001100011 
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|