teyrebaz's Profile
Reputation: 1
Apprentice
- Group:
- New Members
- Active Posts:
- 13 (0.03 per day)
- Joined:
- 14-January 12
- Profile Views:
- 149
- Last Active:
Mar 26 2013 08:10 AM- Currently:
- Offline
Previous Fields
- Dream Kudos:
- 0
Posts I've Made
-
In Topic: Set a selected text in a richTextBox
Posted 8 Feb 2013
private void Form1_Load(object sender, EventArgs e) { richTextBox1.Text = "Enter your text here..."; richTextBox1.Select(0, richTextBox1.TextLength); richTextBox1.SelectionBackColor = Color.Red; } private void richTextBox1_Enter(object sender, EventArgs e) { richTextBox1.Text = ""; }
This will solve your problem, i guess at least if i got your point. -
In Topic: Second form item_check event problem.
Posted 6 Feb 2013
Michael26, on 06 February 2013 - 02:05 PM, said:Well without that code here, i can only guess
/>/>/>
Quote
But before second form unload the secondForm Checkboxlist itemcheck event occurs.
I would double check that part.
Error occurs from second forms method when i call it at constructor. I have a method for checkboxlist which is handling some items checkstate unchecked to checked. How can i prevent it or can i stop execution of checkboxlist itemcheck event at the secondform's constructor?
//second form's state alter method.. calling at constructor. void SelectedRoomBedTypes() { foreach (var item in bedtypes) { for (int i = 0; i < clstBedTypes.Items.Count; i++) { BedTypes bt = clstBedTypes.Items[i] as BedTypes; if (bt.ID == item.BedTypeID) { clstBedTypes.SetItemChecked(i, true); } } } }
//clstBedTypes ItemCheck event BedTypes bt = (BedTypes )clstBedTypes.SelectedItem; if (e.NewValue == CheckState.Unchecked) { RoomBedType r = new RoomBedType(); r.RoomID = _room.ID;//_room object from first form o.BedTypeID = bt.ID; MessageBox.Show(YatakTipIslemleri.OdayaGoreYatakTipSil(o)); } else { OdaYatakTip o = new OdaYatakTip(); o.OdaID = _oda.ID; o.YatakTipID = yt.ID; MessageBox.Show(BedTypeProc.SaveBedRoomTypeByRoom(o)); }
thanks.
Error occurs from second forms method when i call it at constructor. I have a method for checkboxlist which is handling some items checkstate unchecked to checked. How can i prevent it or can i stop execution of checkboxlist itemcheck event at the secondform's constructor?
//second form's state alter method.. calling at constructor.
void SelectedRoomBedTypes() { foreach (var item in bedtypes) { for (int i = 0; i < clstBedTypes.Items.Count; i++) { BedTypes bt = clstBedTypes.Items[i] as BedTypes; if (bt.ID == item.BedTypeID) { clstBedTypes.SetItemChecked(i, true); } } } }
//clstBedTypes ItemCheck event
BedTypes bt = (BedTypes )clstBedTypes.SelectedItem; if (e.NewValue == CheckState.Unchecked) { RoomBedType r = new RoomBedType(); r.RoomID = _room.ID;//_room object from first form r.BedTypeID = bt.ID; MessageBox.Show(YatakTipIslemleri.OdayaGoreYatakTipSil(o)); } else { RoomBedType r = new RoomBedType (); r.OdaID = _oda.ID; r.YatakTipID = yt.ID; MessageBox.Show(BedTypeProc.SaveBedRoomTypeByRoom(o)); }
thanks. -
In Topic: Second form item_check event problem.
Posted 6 Feb 2013
-
In Topic: Object reference not set to an instance of an object
Posted 20 Jan 2013
Ok, i am reading .. thank you very much! -
In Topic: Object reference not set to an instance of an object
Posted 20 Jan 2013
Thank you. You are helpful guy. Yes, i did nothing with instance of First form. But i dont know how to pass value
.
My Information
- Member Title:
- New D.I.C Head
- Age:
- Age Unknown
- Birthday:
- Birthday Unknown
- Gender:
Contact Information
- E-mail:
- Private
Friends
teyrebaz hasn't added any friends yet.
|
|


Find Topics
Find Posts
View Reputation Given
|
Comments
teyrebaz has no profile comments yet. Why not say hello?