Click here to Skip to main content
15,923,910 members
Home / Discussions / C#
   

C#

 
GeneralRe: Mail Application development in .Net Pin
clife5374-Nov-06 4:35
clife5374-Nov-06 4:35 
AnswerRe: Mail Application development in .Net Pin
realin4-Nov-06 4:47
realin4-Nov-06 4:47 
GeneralRe: Mail Application development in .Net Pin
clife5374-Nov-06 20:55
clife5374-Nov-06 20:55 
QuestionRich text box error... Pin
IamHuM3-Nov-06 21:15
IamHuM3-Nov-06 21:15 
AnswerRe: Rich text box error... Pin
CooperWu3-Nov-06 22:29
CooperWu3-Nov-06 22:29 
GeneralRe: Rich text box error... Pin
IamHuM3-Nov-06 22:46
IamHuM3-Nov-06 22:46 
AnswerRe: Rich text box error... Pin
IamHuM3-Nov-06 22:30
IamHuM3-Nov-06 22:30 
GeneralRe: Rich text box error... Pin
mav.northwind4-Nov-06 1:00
mav.northwind4-Nov-06 1:00 
Hi!
If you read the error message (that's usually the prerequisite for finding out what's wrongBig Grin | :-D ) you'll see that the compiler tells you that Control doesn't have a method AppendText.
The Controls collection holds Controls, not RichTextBoxes, so the error message can be explained easily.

Use ((RichTextBox)f2.Controls[0]).AppendText(...) to get rid of the compiler error.

But keep in mind that the code above is bad style. It's easy to add another control to the form and suddenly your RichTextBox isn't Controls[0] anymore - an InvalidCastException will result.

I think it's better to explicitely expose the RichTextBox as a property of f2.


Regards,
mav

--
Black holes are the places where God divided by 0...

GeneralRe: Rich text box error... Pin
IamHuM4-Nov-06 1:19
IamHuM4-Nov-06 1:19 
GeneralRe: Rich text box error... Pin
mav.northwind4-Nov-06 1:46
mav.northwind4-Nov-06 1:46 
GeneralRe: Rich text box error... Pin
IamHuM4-Nov-06 3:06
IamHuM4-Nov-06 3:06 
GeneralRe: Rich text box error... Pin
mav.northwind4-Nov-06 5:13
mav.northwind4-Nov-06 5:13 
QuestionWorkflow in SPS 2007 Pin
Bharat Sukhwal3-Nov-06 19:40
Bharat Sukhwal3-Nov-06 19:40 
QuestionVery Urgent: How Can I make a compelete Instalation file Pin
alhassan013-Nov-06 18:54
alhassan013-Nov-06 18:54 
AnswerRe: Very Urgent: How Can I make a compelete Instalation file Pin
CooperWu3-Nov-06 22:32
CooperWu3-Nov-06 22:32 
AnswerRe: Very Urgent: How Can I make a compelete Instalation file Pin
realin4-Nov-06 4:52
realin4-Nov-06 4:52 
GeneralRe: Very Urgent: How Can I make a compelete Instalation file Pin
alhassan017-Nov-06 19:34
alhassan017-Nov-06 19:34 
QuestionAm I setting up my architecture correctly? Pin
xdavidx3-Nov-06 17:57
xdavidx3-Nov-06 17:57 
AnswerRe: Am I setting up my architecture correctly? Pin
CooperWu3-Nov-06 22:38
CooperWu3-Nov-06 22:38 
AnswerRe: Am I setting up my architecture correctly? Pin
beatles16924-Nov-06 1:01
beatles16924-Nov-06 1:01 
QuestionHow to retrieve the current row of a Data Set Pin
Guardian513-Nov-06 17:50
Guardian513-Nov-06 17:50 
AnswerRe: How to retrieve the current row of a Data Set Pin
beatles16924-Nov-06 1:24
beatles16924-Nov-06 1:24 
GeneralRe: How to retrieve the current row of a Data Set Pin
Guardian514-Nov-06 15:50
Guardian514-Nov-06 15:50 
GeneralRe: How to retrieve the current row of a Data Set Pin
beatles16925-Nov-06 0:04
beatles16925-Nov-06 0:04 
GeneralRe: How to retrieve the current row of a Data Set Pin
Guardian515-Nov-06 23:15
Guardian515-Nov-06 23:15 

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.