Click here to Skip to main content
15,881,424 members
Home / Discussions / C#
   

C#

 
AnswerMessage Removed Pin
4-Jul-14 1:36
mvePete O'Hanlon4-Jul-14 1:36 
GeneralMessage Removed Pin
4-Jul-14 1:47
mveRichard Deeming4-Jul-14 1:47 
AnswerMessage Removed Pin
4-Jul-14 14:55
Jesus Daniel 20134-Jul-14 14:55 
GeneralMessage Removed Pin
5-Jul-14 0:49
professionalEddy Vluggen5-Jul-14 0:49 
Questionhow to solve this.... Pin
Nishant.Chauhan803-Jul-14 23:56
Nishant.Chauhan803-Jul-14 23:56 
AnswerRe: how to solve this.... Pin
Eddy Vluggen4-Jul-14 6:21
professionalEddy Vluggen4-Jul-14 6:21 
Questionaccess textbox in a tabPage Pin
Papatrexas3-Jul-14 23:37
Papatrexas3-Jul-14 23:37 
AnswerRe: access textbox in a tabPage Pin
OriginalGriff3-Jul-14 23:52
mveOriginalGriff3-Jul-14 23:52 
There are much, much better ways to do this.

Have a look at creating a UserControl[^]. This allows you to create a new control in your toolbox which can contain (and encapsulate) the text box and the check box - so the check box always knows which text box it is supposed to affect: there is only one as far as it is concerned!

Your code then becomes:
C#
private void changePath_CheckedChanged(object sender, EventArgs e)
        {
        papatrexas.ReadOnly = !changePath.Checked;
        }
And everything becomes a lot easier to read and work with.

Usercontrols have constructors, properties, methods, events - everything a "normal" control does, so you can even create a UserControl which contains the whole of your tab page - and then just add one to each page in your TabControl instead of individual controls!

I use them a lot: they let me modularise the form a lot better and save a heck of a lot of time and confusion!
Those who fail to learn history are doomed to repeat it. --- George Santayana (December 16, 1863 – September 26, 1952)
Those who fail to clear history are doomed to explain it. --- OriginalGriff (February 24, 1959 – ∞)

Questionc# ListView header text word wrap option Pin
Galym3-Jul-14 18:28
professionalGalym3-Jul-14 18:28 
AnswerRe: c# ListView header text word wrap option Pin
Pete O'Hanlon4-Jul-14 1:48
mvePete O'Hanlon4-Jul-14 1:48 
GeneralRe: c# ListView header text word wrap option Pin
Galym4-Jul-14 17:39
professionalGalym4-Jul-14 17:39 
Questionhow to scan file on virustotal Pin
Member 105796733-Jul-14 17:42
Member 105796733-Jul-14 17:42 
AnswerRe: how to scan file on virustotal Pin
Richard MacCutchan4-Jul-14 0:49
mveRichard MacCutchan4-Jul-14 0:49 
Questionaccessing public static member of one class in another class Pin
KRISHNARAYALU3-Jul-14 11:59
KRISHNARAYALU3-Jul-14 11:59 
AnswerRe: accessing public static member of one class in another class Pin
Matt T Heffron3-Jul-14 12:32
professionalMatt T Heffron3-Jul-14 12:32 
GeneralRe: accessing public static member of one class in another class Pin
KRISHNARAYALU4-Jul-14 0:48
KRISHNARAYALU4-Jul-14 0:48 
GeneralRe: accessing public static member of one class in another class Pin
Pete O'Hanlon4-Jul-14 1:40
mvePete O'Hanlon4-Jul-14 1:40 
AnswerRe: accessing public static member of one class in another class Pin
Dave Kreskowiak3-Jul-14 18:05
mveDave Kreskowiak3-Jul-14 18:05 
AnswerRe: accessing public static member of one class in another class Pin
Richard MacCutchan4-Jul-14 0:48
mveRichard MacCutchan4-Jul-14 0:48 
Questionmoving slideshow Pin
Member 109229203-Jul-14 8:36
Member 109229203-Jul-14 8:36 
AnswerRe: moving slideshow Pin
User 48350473-Jul-14 9:22
User 48350473-Jul-14 9:22 
QuestionMongo DB Projection from C# Pin
Ennis Ray Lynch, Jr.3-Jul-14 8:22
Ennis Ray Lynch, Jr.3-Jul-14 8:22 
AnswerRe: Mongo DB Projection from C# Pin
Richard Deeming3-Jul-14 8:47
mveRichard Deeming3-Jul-14 8:47 
GeneralRe: Mongo DB Projection from C# Pin
Ennis Ray Lynch, Jr.3-Jul-14 9:20
Ennis Ray Lynch, Jr.3-Jul-14 9:20 
QuestionInternet Cafe Management System Pin
Abdul-Qaadir2-Jul-14 10:14
Abdul-Qaadir2-Jul-14 10:14 

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.