GenericWindow.SetTextview C# (CSharp) Method

SetTextview() public method

public SetTextview ( string str ) : void
str string
return void
    public void SetTextview(string str)
    {
        TextBuffer tb = new TextBuffer (new TextTagTable());
        tb.Text = str;
        textview.Buffer = tb;
    }

Usage Example

示例#1
0
    private void on_button_add_comment_clicked(object o, EventArgs args)
    {
        //new DialogMessage(Constants.MessageTypes.INFO, "not implemented yet");

        //see if there's any comment
        string comment = "";

        if (selected)
        {
            TreeModel model;
            TreeIter  iter1;

            if (treeview1.Selection.GetSelected(out model, out iter1))
            {
                string    str     = getRow(iter1);
                string [] statRow = str.ToString().Split(new char[] { '\t' });
                comment = statRow[8];
            }

            genericWin = GenericWindow.Show(Catalog.GetString("Add comment"),
                                            Catalog.GetString("Comment this statistic"),
                                            Constants.GenericWindowShow.TEXTVIEW);
            genericWin.SetTextview(comment);
            genericWin.Button_accept.Clicked += new EventHandler(on_comment_add_accepted);
        }
    }
All Usage Examples Of GenericWindow::SetTextview