Quantcast
Channel: Windows Forms Data Controls and Databinding forum
Viewing all articles
Browse latest Browse all 2535

how to put check mark on cited source

$
0
0

Hi,

I have a ListBox that show the Current List and what I want is to put check mark on cited source or put a check mark on item that has been already inserted in the active document.

looks like this 

by the way here is the code for my listbox

//bind the author,year,title and tag property into listbox
            Word.Application App = Globals.ThisAddIn.Application;
            Word.Document doc = App.ActiveDocument;
            Word.Sources sour = doc.Bibliography.Sources;

                string[] strItems = new string[sour.Count];
                for (int i = 1; i <= sour.Count; i++)
                {
                    Word.Source ssour = sour[i];
                    string tag = ssour.Tag;
                    if (ssour.XML.IndexOf("<b:Author>") >= 0)
                    {
                        strItems[i - 1] += ssour.Field["Author"] + ";";
                    }
                    if (ssour.XML.IndexOf("<b:Title>") >= 0)
                    {
                        strItems[i - 1] += ssour.Field["Title"];
                    }
                    if (ssour.XML.IndexOf("<b:Year>") >= 0)
                    {
                        strItems[i - 1] += "(" + ssour.Field["Year"] + ")";
                    }
                    listBox1.DisplayMember = "Name";
                    listBox1.ValueMember = "Tag";
                    listBox1.Items.Add(new Tagg(strItems[i - 1], tag));

i hope someone knows how to do it

thank you in advance

more power and

god bless


Viewing all articles
Browse latest Browse all 2535

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>