Click here to Skip to main content
15,920,438 members
Home / Discussions / C#
   

C#

 
Questionreferencing a control from a string Pin
Tom Wright19-May-09 9:17
Tom Wright19-May-09 9:17 
AnswerRe: referencing a control from a string [modified] Pin
Jimmanuel19-May-09 9:46
Jimmanuel19-May-09 9:46 
GeneralRe: referencing a control from a string Pin
Tom Wright19-May-09 10:25
Tom Wright19-May-09 10:25 
GeneralRe: referencing a control from a string Pin
Tom Wright19-May-09 10:27
Tom Wright19-May-09 10:27 
GeneralRe: referencing a control from a string Pin
Jimmanuel19-May-09 10:38
Jimmanuel19-May-09 10:38 
GeneralRe: referencing a control from a string Pin
Tom Wright19-May-09 10:40
Tom Wright19-May-09 10:40 
GeneralRe: referencing a control from a string Pin
Jimmanuel19-May-09 11:00
Jimmanuel19-May-09 11:00 
GeneralRe: referencing a control from a string Pin
Jimmanuel19-May-09 11:17
Jimmanuel19-May-09 11:17 
modification to my previous statement:

in order for this to work:
pb = (PictureBox)this.Controls[picBox];
the picture box needs to be parented by the main form. If it exists on a child panel or a tab control or something like that then it won't exist in the main forms control collection. You'll have to recursively search the this.Control objects to find it.

Like I said before, why not just store the picture box itself in the tag of the radio button? Then you'd have
PictureBox pb = rb.Tag as PictureBox;
and you'd be done.


Badger | [badger,badger,badger,badger...]

AnswerRe: referencing a control from a string [modified] Pin
xcorporation19-May-09 11:05
xcorporation19-May-09 11:05 
GeneralRe: referencing a control from a string Pin
Tom Wright20-May-09 8:45
Tom Wright20-May-09 8:45 
QuestionRegex question Pin
Harvey Saayman19-May-09 8:46
Harvey Saayman19-May-09 8:46 
AnswerRe: Regex question Pin
led mike19-May-09 8:54
led mike19-May-09 8:54 
AnswerRe: Regex question Pin
Noctris19-May-09 8:56
Noctris19-May-09 8:56 
QuestionColor Convertor Pin
Rafone19-May-09 8:34
Rafone19-May-09 8:34 
AnswerRe: Color Convertor Pin
led mike19-May-09 8:50
led mike19-May-09 8:50 
QuestionComboBox AutoComplete with id value Pin
Noctris19-May-09 6:28
Noctris19-May-09 6:28 
AnswerRe: ComboBox AutoComplete with id value Pin
musefan19-May-09 6:42
musefan19-May-09 6:42 
GeneralRe: ComboBox AutoComplete with id value Pin
Noctris19-May-09 7:06
Noctris19-May-09 7:06 
AnswerRe: ComboBox AutoComplete with id value Pin
Noctris19-May-09 9:37
Noctris19-May-09 9:37 
QuestionToolstrip font combobox Pin
malcomhfc19-May-09 5:01
malcomhfc19-May-09 5:01 
AnswerRe: Toolstrip font combobox Pin
0x3c019-May-09 5:13
0x3c019-May-09 5:13 
GeneralRe: Toolstrip font combobox Pin
malcomhfc19-May-09 5:21
malcomhfc19-May-09 5:21 
GeneralRe: Toolstrip font combobox Pin
0x3c019-May-09 5:40
0x3c019-May-09 5:40 
GeneralRe: Toolstrip font combobox [modified] Pin
malcomhfc19-May-09 5:44
malcomhfc19-May-09 5:44 
GeneralRe: Toolstrip font combobox Pin
musefan19-May-09 6:16
musefan19-May-09 6: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.