Click here to Skip to main content
15,919,422 members
Home / Discussions / C#
   

C#

 
GeneralCreating a custom Combobox control Pin
bjoernen21-Mar-05 11:37
bjoernen21-Mar-05 11:37 
GeneralRe: Creating a custom Combobox control Pin
MoustafaS21-Mar-05 20:04
MoustafaS21-Mar-05 20:04 
GeneralRe: Creating a custom Combobox control Pin
bjoernen21-Mar-05 21:18
bjoernen21-Mar-05 21:18 
GeneralCreate access database Pin
webhay21-Mar-05 9:44
webhay21-Mar-05 9:44 
GeneralRe: Create access database Pin
Yaakov Davis21-Mar-05 10:41
Yaakov Davis21-Mar-05 10:41 
GeneralRe: Create access database Pin
webhay23-Mar-05 3:12
webhay23-Mar-05 3:12 
GeneralRe: Create access database Pin
afinnell24-Mar-05 18:43
afinnell24-Mar-05 18:43 
GeneralCopy richtextbox contents to another Pin
fracalifa21-Mar-05 9:30
fracalifa21-Mar-05 9:30 
GeneralRe: Copy richtextbox contents to another Pin
Todd_s0221-Mar-05 9:48
Todd_s0221-Mar-05 9:48 
GeneralUpdating a database Pin
kornstyle21-Mar-05 8:42
kornstyle21-Mar-05 8:42 
GeneralRe: Updating a database Pin
Dave Kreskowiak21-Mar-05 11:16
mveDave Kreskowiak21-Mar-05 11:16 
Generalempty textBoxes Pin
xrado21-Mar-05 6:41
xrado21-Mar-05 6:41 
GeneralRe: empty textBoxes Pin
techieboi21-Mar-05 6:58
techieboi21-Mar-05 6:58 
I use code like the following to set control's to their default values. You can either pass in the tab page to the function or modify it slightly and pass in the tab control and step through the control's pages.

private void ClearTextBoxes (Control parentControl)
{
// Step through each control in the parent control and clear it's text if a textbox
foreach (Control control in parentControl.Controls)
{
if (control is System.Windows.Forms.TextBox)
control.Text = string.Empty;
}
}

This method has the added advantage that you can also default check boxes' and other controls' properties by adding an additional if (control is [control type]) statement in the for loop.

Hope this helps
Aaron
GeneralRe: empty textBoxes Pin
xrado21-Mar-05 19:24
xrado21-Mar-05 19:24 
GeneralC# Windows Forms App : 2 Exe Files Pin
rt721-Mar-05 6:38
rt721-Mar-05 6:38 
GeneralRe: C# Windows Forms App : 2 Exe Files Pin
Dave Kreskowiak21-Mar-05 8:36
mveDave Kreskowiak21-Mar-05 8:36 
Generalasp.net selected broken Pin
Joshua Lunsford21-Mar-05 6:09
Joshua Lunsford21-Mar-05 6:09 
GeneralRe: asp.net selected broken Pin
Joshua Lunsford21-Mar-05 8:33
Joshua Lunsford21-Mar-05 8:33 
GeneralRe: asp.net selected broken Pin
leppie21-Mar-05 8:39
leppie21-Mar-05 8:39 
GeneralCheap RegExpression Question Pin
matthias s.21-Mar-05 5:25
matthias s.21-Mar-05 5:25 
GeneralRe: Cheap RegExpression Question Pin
leppie21-Mar-05 5:42
leppie21-Mar-05 5:42 
QuestionHow to make a blinking notify icon Pin
saarkk21-Mar-05 5:09
saarkk21-Mar-05 5:09 
AnswerRe: How to make a blinking notify icon Pin
leppie21-Mar-05 5:47
leppie21-Mar-05 5:47 
General.net compact framework using File stream problem Pin
Rene Xavier21-Mar-05 4:57
Rene Xavier21-Mar-05 4:57 
General:validating against NT Sam and Active Directory Pin
Ordina21-Mar-05 4:16
Ordina21-Mar-05 4:16 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.