Click here to Skip to main content
15,887,251 members
Home / Discussions / C#
   

C#

 
AnswerRe: Parse XML Sibling Pin
surya tri13-Apr-15 2:21
surya tri13-Apr-15 2:21 
Questiongenerate a sequence of number prefixed with a character Pin
Jimmy-IN8-Apr-15 23:17
Jimmy-IN8-Apr-15 23:17 
AnswerRe: generate a sequence of number prefixed with a character Pin
Freak308-Apr-15 23:26
Freak308-Apr-15 23:26 
AnswerRe: generate a sequence of number prefixed with a character Pin
Pete O'Hanlon8-Apr-15 23:29
mvePete O'Hanlon8-Apr-15 23:29 
GeneralRe: generate a sequence of number prefixed with a character Pin
Jimmy-IN8-Apr-15 23:35
Jimmy-IN8-Apr-15 23:35 
GeneralRe: generate a sequence of number prefixed with a character Pin
Eddy Vluggen9-Apr-15 0:23
professionalEddy Vluggen9-Apr-15 0:23 
AnswerRe: generate a sequence of number prefixed with a character Pin
V.9-Apr-15 2:08
professionalV.9-Apr-15 2:08 
QuestionGet listbox text to show in richtextbox + custom text Pin
Googooli868-Apr-15 22:52
Googooli868-Apr-15 22:52 
Hi there,

I'm making a bible book app where I have listbox, richtextbox and search textbox.

I have som problem coding when the listbox text is chosen, It will show the listbox text + custom text in richtextbox.

I have done this:
C#
private void btnAra_Click(object sender, EventArgs e)
    {
        int index = 0;
        String temp = richTextBox1.Text;
            richTextBox1.Text = "";
        richTextBox1.Text = temp;

        while (index < richTextBox1.Text.LastIndexOf(txtAra.Text))
        {
            richTextBox1.Find(txtAra.Text, index, richTextBox1.TextLength, RichTextBoxFinds.None);
            richTextBox1.SelectionBackColor = Color.Orange;
            index = richTextBox1.Text.IndexOf(txtAra.Text, index) + 1;
        }
    }

But since this is going to be a book app, I want the chosen listbox to show a text file in richtexbox and not only 2-3 sentences..

Any tip for what I can do?

Updated with this:

C#
private void listBox1_SelectedIndexChanged(object sender, EventArgs e)
      {

          var str = listBox1.SelectedItem.ToString();
          if (str == "    Yaratılış        Tevrat")
          {
              richTextBox1.Text = str + "\t\r\n\nText here";
          }
          else if (str == "    Mısır'dan Çıkış              (Yasa)")
          {
              richTextBox1.Text = str + "\t\r\n\ncustom text 2";
          }

Answer[REPOST] Pin
Sascha Lefèvre8-Apr-15 23:35
professionalSascha Lefèvre8-Apr-15 23:35 
QuestionHow do I filter PPID between oPsType.PPIDFrom and oPsType.PPIDTo, and pay_type in oPsType.PAY_TYPE Pin
Member 115045458-Apr-15 9:42
Member 115045458-Apr-15 9:42 
AnswerRe: How do I filter PPID between oPsType.PPIDFrom and oPsType.PPIDTo, and pay_type in oPsType.PAY_TYPE Pin
Mycroft Holmes8-Apr-15 14:19
professionalMycroft Holmes8-Apr-15 14:19 
QuestionToday's Async Question #2 Pin
Kevin Marois8-Apr-15 8:35
professionalKevin Marois8-Apr-15 8:35 
QuestionAnother Async Question Pin
Kevin Marois8-Apr-15 8:18
professionalKevin Marois8-Apr-15 8:18 
AnswerRe: Another Async Question PinPopular
Richard Deeming8-Apr-15 8:27
mveRichard Deeming8-Apr-15 8:27 
GeneralRe: Another Async Question Pin
Kevin Marois8-Apr-15 8:30
professionalKevin Marois8-Apr-15 8:30 
GeneralRe: Another Async Question Pin
Mycroft Holmes8-Apr-15 14:22
professionalMycroft Holmes8-Apr-15 14:22 
Question{0} Pin
Member 115906308-Apr-15 3:04
Member 115906308-Apr-15 3:04 
AnswerRe: {0} Pin
harold aptroot8-Apr-15 3:35
harold aptroot8-Apr-15 3:35 
AnswerRe: {0} Pin
Sascha Lefèvre8-Apr-15 3:49
professionalSascha Lefèvre8-Apr-15 3:49 
Questionconverting given hex value into rgb Pin
Member 115353748-Apr-15 1:25
Member 115353748-Apr-15 1:25 
GeneralRe: converting given hex value into rgb Pin
harold aptroot8-Apr-15 1:44
harold aptroot8-Apr-15 1:44 
AnswerRe: converting given hex value into rgb Pin
OriginalGriff8-Apr-15 4:38
mveOriginalGriff8-Apr-15 4:38 
JokeRe: converting given hex value into rgb Pin
Richard Deeming8-Apr-15 8:04
mveRichard Deeming8-Apr-15 8:04 
GeneralRe: converting given hex value into rgb Pin
OriginalGriff8-Apr-15 8:17
mveOriginalGriff8-Apr-15 8:17 
Questionsharing files on single pc in .net Pin
Member 115353748-Apr-15 1:23
Member 115353748-Apr-15 1:23 

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.