本文整理汇总了C#中Gtk.CellRendererText类的典型用法代码示例。如果您正苦于以下问题:C# CellRendererText类的具体用法?C# CellRendererText怎么用?C# CellRendererText使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
CellRendererText类属于Gtk命名空间,在下文中一共展示了CellRendererText类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。
示例1: Initialize
public void Initialize (Gtk.TreeView treeView)
{
TreeViewColumn column = new TreeViewColumn ();
CellRendererToggle toggleRenderer = new CellRendererToggle ();
toggleRenderer.Toggled += ToggleRendererToggled;
column.PackStart (toggleRenderer, false);
column.AddAttribute (toggleRenderer, "active", 0);
var pixbufRenderer = new CellRendererPixbuf ();
column.PackStart (pixbufRenderer, false);
column.AddAttribute (pixbufRenderer, "pixbuf", 1);
CellRendererText textRenderer = new CellRendererText ();
column.PackStart (textRenderer, true);
column.AddAttribute (textRenderer, "text", 2);
column.Expand = true;
treeView.AppendColumn (column);
Ambience ambience = AmbienceService.GetAmbienceForFile (options.Document.FileName);
foreach (IBaseMember member in GetValidMembers ()) {
Store.AppendValues (false, ImageService.GetPixbuf (member.StockIcon, IconSize.Menu), ambience.GetString (member, member.MemberType == MonoDevelop.Projects.Dom.MemberType.Parameter ? OutputFlags.IncludeParameterName : OutputFlags.ClassBrowserEntries), member);
}
treeView.Model = store;
}
开发者ID:yayanyang,项目名称:monodevelop,代码行数:26,代码来源:AbstractGenerateAction.cs
示例2: MonoRuntimePanelWidget
public MonoRuntimePanelWidget()
{
this.Build();
labelRunning.Markup = GettextCatalog.GetString ("MonoDevelop is currently running on <b>{0}</b>.", Runtime.SystemAssemblyService.CurrentRuntime.DisplayName);
store = new ListStore (typeof(string), typeof(object));
tree.Model = store;
CellRendererText crt = new CellRendererText ();
tree.AppendColumn ("Runtime", crt, "markup", 0);
TargetRuntime defRuntime = IdeApp.Preferences.DefaultTargetRuntime;
foreach (TargetRuntime tr in Runtime.SystemAssemblyService.GetTargetRuntimes ()) {
string name = tr.DisplayName;
TreeIter it;
if (tr == defRuntime) {
name = "<b>" + name + " (Default)</b>";
defaultIter = it = store.AppendValues (name, tr);
} else
it = store.AppendValues (name, tr);
if (tr.IsRunning)
runningIter = it;
}
tree.Selection.Changed += HandleChanged;
UpdateButtons ();
}
开发者ID:raufbutt,项目名称:monodevelop-old,代码行数:27,代码来源:MonoRuntimePanel.cs
示例3: MergeDialog
public MergeDialog(MercurialRepository repo, bool rebasing)
{
this.Build ();
this.repo = repo;
this.rebasing = rebasing;
store = new TreeStore (typeof(string), typeof(Gdk.Pixbuf), typeof (string), typeof(string));
tree.Model = store;
CellRendererPixbuf crp = new CellRendererPixbuf ();
TreeViewColumn col = new TreeViewColumn ();
col.PackStart (crp, false);
col.AddAttribute (crp, "pixbuf", 1);
CellRendererText crt = new CellRendererText ();
col.PackStart (crt, true);
col.AddAttribute (crt, "text", 2);
tree.AppendColumn (col);
tree.Selection.Changed += HandleTreeSelectionChanged;
if (rebasing) {
labelHeader.Text = GettextCatalog.GetString ("Select the branch to which to rebase:");
checkStage.Label = GettextCatalog.GetString ("Stash/unstash local changes before/after rebasing");
}
checkStage.Active = true;
Fill ();
}
开发者ID:atsushieno,项目名称:monodevelop-mercurial,代码行数:30,代码来源:MergeDialog.cs
示例4: Initialize
public void Initialize (TreeView treeView)
{
var column = new TreeViewColumn ();
var toggleRenderer = new CellRendererToggle ();
toggleRenderer.Toggled += ToggleRendererToggled;
column.PackStart (toggleRenderer, false);
column.AddAttribute (toggleRenderer, "active", 0);
var pixbufRenderer = new CellRendererImage ();
column.PackStart (pixbufRenderer, false);
column.AddAttribute (pixbufRenderer, "image", 1);
var textRenderer = new CellRendererText ();
column.PackStart (textRenderer, true);
column.AddAttribute (textRenderer, "text", 2);
column.Expand = true;
treeView.AppendColumn (column);
foreach (object obj in GetValidMembers ()) {
var member = obj as ISymbol;
if (member != null) {
Store.AppendValues (false, ImageService.GetIcon (member.GetStockIcon (), IconSize.Menu), member.ToDisplayString (Ambience.LabelFormat), member);
continue;
}
var tuple = obj as Tuple<ISymbol, bool>;
if (tuple != null) {
Store.AppendValues (false, ImageService.GetIcon (tuple.Item1.GetStockIcon (), IconSize.Menu), tuple.Item1.ToDisplayString (Ambience.LabelFormat), tuple);
continue;
}
}
treeView.Model = store;
}
开发者ID:pabloescribanoloza,项目名称:monodevelop,代码行数:35,代码来源:AbstractGenerateAction.cs
示例5: PageComboBox
public PageComboBox (IList<Page> pages, Notebook notebook)
{
this.pages = pages;
this.notebook = notebook;
// icon, name, order, Page object itself
model = new ListStore (typeof(Gdk.Pixbuf), typeof(string), typeof(int), typeof(Page));
model.SetSortColumnId (2, SortType.Ascending);
Model = model;
CellRendererPixbuf icon = new CellRendererPixbuf ();
PackStart (icon, false);
AddAttribute (icon, "pixbuf", 0);
CellRendererText name = new CellRendererText ();
PackStart (name, true);
AddAttribute (name, "markup", 1);
foreach (Page page in pages) {
model.AppendValues (
Banshee.Gui.IconThemeUtils.LoadIcon (page.IconName, 22),
String.Format ("<b>{0}</b>", page.Name),
page.Order,
page
);
}
Active = 0;
Show ();
}
开发者ID:haugjan,项目名称:banshee-hacks,代码行数:30,代码来源:PageComboBox.cs
示例6: MergeDialog
public MergeDialog (GitRepository repo, bool rebasing)
{
this.Build ();
this.UseNativeContextMenus ();
this.repo = repo;
this.rebasing = rebasing;
store = new TreeStore (typeof(string), typeof(Xwt.Drawing.Image), typeof (string), typeof(string));
tree.Model = store;
var crp = new CellRendererImage ();
var col = new TreeViewColumn ();
col.PackStart (crp, false);
col.AddAttribute (crp, "image", 1);
var crt = new CellRendererText ();
col.PackStart (crt, true);
col.AddAttribute (crt, "text", 2);
tree.AppendColumn (col);
tree.Selection.Changed += HandleTreeSelectionChanged;
if (rebasing) {
labelHeader.Text = GettextCatalog.GetString ("Select the branch to which to rebase:");
checkStage.Label = GettextCatalog.GetString ("Stash/unstash local changes before/after rebasing");
buttonOk.Label = GettextCatalog.GetString ("Rebase");
}
checkStage.Active = true;
Fill ();
}
开发者ID:pabloescribanoloza,项目名称:monodevelop,代码行数:33,代码来源:MergeDialog.cs
示例7: ContentDirectoryInfo
public ContentDirectoryInfo (RemoteContentDirectory contentDirectory)
{
if (contentDirectory == null) {
throw new ArgumentNullException ("contentDirectory");
}
this.content_directry = contentDirectory;
this.store = new TreeStore (typeof (ObjectRow));
var objects = new TreeView ();
var column = new TreeViewColumn ();
var cell = new CellRendererText ();
column.PackStart (cell, true);
column.SetCellDataFunc (cell, RenderObject);
column.Title = "Objects";
objects.AppendColumn (column);
objects.Selection.Changed += HandleObjectsSelectionChanged;
objects.RowExpanded += HandleObjectsRowExpanded;
objects.Model = store;
var root = contentDirectory.GetRootObject ();
store.AppendValues (new ObjectRow (root));
TreeIter iter;
store.GetIterFirst (out iter);
store.AppendValues (iter, loading);
Add (objects);
}
开发者ID:pacificIT,项目名称:mono-upnp,代码行数:27,代码来源:ContentDirectoryInfo.cs
示例8: PeopleTreeView
public PeopleTreeView()
{
Selection.Mode = SelectionMode.Single;
HeadersVisible = false;
peopleTreeStore = new TreeStore(typeof(uint),typeof(string),typeof(Tag));
this.Model = peopleTreeStore;
TagStore.ItemsAdded += TagStoreItemsAdded;
TagStore.ItemsChanged += TagStoreItemsChanged;
TagStore.ItemsRemoved += TagStoreItemsRemoved;
complete_column = new TreeViewColumn();
pix_render = new CellRendererPixbuf();
complete_column.PackStart(pix_render,false);
complete_column.SetCellDataFunc(pix_render, new TreeCellDataFunc(IconDataFunc));
text_render = new CellRendererText();
complete_column.PackStart( text_render, true);
complete_column.SetCellDataFunc( text_render, new TreeCellDataFunc( NameDataFunc));
AppendColumn(complete_column);
RefreshPeopleTreeStore ();
//TODO If have time - add people search.
}
开发者ID:kanitw,项目名称:facespot,代码行数:28,代码来源:PeopleTreeView.cs
示例9: ComboBoxHelper
public ComboBoxHelper(ComboBox comboBox, object id, string selectSql)
{
CellRendererText cellRendererText = new CellRendererText ();
comboBox.PackStart (cellRendererText, false);
comboBox.SetCellDataFunc (cellRendererText, new CellLayoutDataFunc (delegate(CellLayout cell_layout, CellRenderer cell, TreeModel tree_model, TreeIter iter) {
cellRendererText.Text = ((object[])tree_model.GetValue(iter, 0))[1].ToString();
}));
ListStore listStore = new ListStore (typeof(object));
object[] initial = new object[] { null, "<sin asignar>" };
TreeIter initialTreeIter = listStore.AppendValues ((object)initial);
IDbCommand dbCommand = App.Instance.DbConnection.CreateCommand ();
dbCommand.CommandText = selectSql;
IDataReader dataReader = dbCommand.ExecuteReader ();
while (dataReader.Read()) {
object currentId = dataReader [0];
object currentName = dataReader [1];
object[] values = new object[] { currentId, currentName };
TreeIter treeIter = listStore.AppendValues ((object)values);
if (currentId.Equals (id))
initialTreeIter = treeIter;
}
dataReader.Close ();
comboBox.Model = listStore;
comboBox.SetActiveIter (initialTreeIter);
}
开发者ID:crivaly,项目名称:AD,代码行数:27,代码来源:ComboBoxHelper.cs
示例10: MultiChooserDialog
public MultiChooserDialog(IList options, IList banned)
{
base.Modal = true;
base.HeightRequest = 400;
base.WidthRequest = 250;
//TODO: i18n
base.Title = GettextCatalog.GetString ("Choose elements");
base.AddButton(GettextCatalog.GetString ("_Cancel"), Gtk.ResponseType.Cancel);
base.AddButton(GettextCatalog.GetString ("_Accept"), Gtk.ResponseType.Accept);
base.Response += new Gtk.ResponseHandler(OnResponse);
TreeView treeView = new TreeView();
treeView.HeadersVisible = false;
_store = new ListStore(typeof(bool), typeof(string));
treeView.Model = _store;
CellRendererToggle crtgl = new CellRendererToggle();
crtgl.Activatable = true;
crtgl.Toggled += new ToggledHandler(CheckboxToggledHandler);
TreeViewColumn column = new TreeViewColumn ();
column.PackStart(crtgl, false);
column.AddAttribute(crtgl, "active", 0);
treeView.AppendColumn(column);
CellRendererText crtxt = new CellRendererText ();
column = new TreeViewColumn ();
column.PackStart(crtxt, false);
column.AddAttribute(crtxt, "text", 1);
treeView.AppendColumn(column);
Gtk.ScrolledWindow sw = new Gtk.ScrolledWindow();
sw.ShadowType = Gtk.ShadowType.In;
sw.Add(treeView);
treeView.Show();
base.VBox.Add(sw);
ShowList(options, banned);
sw.Show();
}
开发者ID:MonoBrasil,项目名称:historico,代码行数:35,代码来源:MultiChooserDialog.cs
示例11: UniqueConstraintEditorWidget
public UniqueConstraintEditorWidget (ISchemaProvider schemaProvider, SchemaActions action)
{
if (schemaProvider == null)
throw new ArgumentNullException ("schemaProvider");
this.schemaProvider = schemaProvider;
this.action = action;
this.Build();
store = new ListStore (typeof (string), typeof (bool), typeof (string), typeof (object));
listUnique.Model = store;
listUnique.Selection.Changed += new EventHandler (SelectionChanged);
columnSelecter.ColumnToggled += new EventHandler (ColumnToggled);
TreeViewColumn colName = new TreeViewColumn ();
colName.Title = AddinCatalog.GetString ("Name");
CellRendererText nameRenderer = new CellRendererText ();
nameRenderer.Editable = true;
nameRenderer.Edited += new EditedHandler (NameEdited);
colName.PackStart (nameRenderer, true);
colName.AddAttribute (nameRenderer, "text", colNameIndex);
listUnique.AppendColumn (colName);
ShowAll ();
}
开发者ID:FreeBSD-DotNet,项目名称:monodevelop,代码行数:31,代码来源:UniqueConstraintEditorWidget.cs
示例12: ProjectFileSelectorDialog
public ProjectFileSelectorDialog (Project project, string defaultFilterName, string defaultFilterPattern, string [] buildActions)
{
this.project = project;
this.defaultFilter = new SelectFileDialogFilter (defaultFilterName, defaultFilterPattern ?? "*");
this.buildActions = buildActions;
this.Build();
projBuf = ImageService.GetIcon (project.StockIcon, IconSize.Menu);
dirClosedBuf = ImageService.GetIcon (MonoDevelop.Ide.Gui.Stock.ClosedFolder, IconSize.Menu);
dirOpenBuf = ImageService.GetIcon (MonoDevelop.Ide.Gui.Stock.OpenFolder, IconSize.Menu);
TreeViewColumn projectCol = new TreeViewColumn ();
projectCol.Title = GettextCatalog.GetString ("Project Folders");
var pixRenderer = new CellRendererImage ();
CellRendererText txtRenderer = new CellRendererText ();
projectCol.PackStart (pixRenderer, false);
projectCol.PackStart (txtRenderer, true);
projectCol.SetCellDataFunc (pixRenderer, new TreeCellDataFunc (PixDataFunc));
projectCol.SetCellDataFunc (txtRenderer, new TreeCellDataFunc (TxtDataFunc));
projectTree.Model = dirStore;
projectTree.AppendColumn (projectCol);
TreeIter projectIter = dirStore.AppendValues ("", FilePath.Empty);
InitDirs (projectIter);
projectTree.ExpandAll ();
projectTree.RowActivated += delegate {
fileList.GrabFocus ();
};
projectTree.KeyPressEvent += ProjectListKeyPressEvent;
TreeViewColumn fileCol = new TreeViewColumn ();
var filePixRenderer = new CellRendererImage ();
fileCol.Title = GettextCatalog.GetString ("Files");
fileCol.PackStart (filePixRenderer, false);
fileCol.PackStart (txtRenderer, true);
fileCol.AddAttribute (filePixRenderer, "image", 1);
fileCol.SetCellDataFunc (txtRenderer, new TreeCellDataFunc (TxtFileDataFunc));
fileList.Model = fileStore;
fileList.AppendColumn (fileCol);
fileList.RowActivated += delegate {
TreeIter iter;
if (fileList.Selection.GetSelected (out iter))
Respond (ResponseType.Ok);
};
fileList.KeyPressEvent += FileListKeyPressEvent;
fileList.KeyReleaseEvent += FileListKeyReleaseEvent;
TreeIter root;
if (dirStore.GetIterFirst (out root))
projectTree.Selection.SelectIter (root);
UpdateFileList (null, null);
projectTree.Selection.Changed += UpdateFileList;
fileList.Selection.Changed += UpdateSensitivity;
this.DefaultResponse = ResponseType.Cancel;
this.Modal = true;
}
开发者ID:pabloescribanoloza,项目名称:monodevelop,代码行数:60,代码来源:ProjectFileSelectorDialog.cs
示例13: WebDeployLaunchDialog
public WebDeployLaunchDialog (AspNetAppProject project)
{
this.Build();
this.project = project;
//set up the sort order
targetStore.SetSortFunc (LISTCOL_Text, delegate (TreeModel m, TreeIter a, TreeIter b) {
return string.Compare ((string) m.GetValue (a, LISTCOL_Text), (string) m.GetValue (b, LISTCOL_Text));
});
targetStore.SetSortColumnId (LISTCOL_Text, SortType.Ascending);
//set up the view
targetView.Model = targetStore;
targetView.HeadersVisible = false;
CellRendererToggle toggleRenderer = new CellRendererToggle ();
toggleRenderer.Activatable = true;
toggleRenderer.Xpad = 6;
TreeViewColumn checkCol = new TreeViewColumn ("", toggleRenderer, "active", LISTCOL_Checked);
checkCol.Expand = false;
targetView.AppendColumn (checkCol);
toggleRenderer.Toggled += HandleToggle;
CellRendererText textRenderer = new CellRendererText ();
textRenderer.WrapMode = Pango.WrapMode.WordChar;
targetView.AppendColumn ("", textRenderer, "markup", LISTCOL_Text);
fillStore ();
}
开发者ID:Kalnor,项目名称:monodevelop,代码行数:30,代码来源:WebDeployLaunchDialog.cs
示例14: PythonOptionsWidget
public PythonOptionsWidget ()
{
this.Build();
// Python paths
m_PathsListStore = new ListStore (typeof (string));
m_PathsTreeView.Model = this.m_PathsListStore;
m_PathsTreeView.HeadersVisible = false;
TreeViewColumn column = new TreeViewColumn ();
CellRendererText ctext = new CellRendererText ();
column.PackStart (ctext, true);
column.AddAttribute (ctext, "text", 0);
m_PathsTreeView.AppendColumn (column);
m_PathsTreeView.Selection.Changed += delegate {
this.m_RemovePathButton.Sensitive = m_PathsTreeView.Selection.CountSelectedRows () == 1;
};
// Setup Python Runtime Version
m_RuntimeListStore = new ListStore (typeof (string), typeof (Type));
m_RuntimeCombo.Model = this.m_RuntimeListStore;
m_RuntimeListStore.AppendValues ("Python 2.5", typeof (Python25Runtime));
m_RuntimeListStore.AppendValues ("Python 2.6", typeof (Python26Runtime));
m_RuntimeListStore.AppendValues ("Python 2.7", typeof (Python27Runtime));
m_RuntimeListStore.AppendValues ("IronPython", typeof (IronPythonRuntime));
m_RuntimeCombo.Changed += delegate {
m_RuntimeFileEntry.Path = String.Empty;
};
}
开发者ID:Kalnor,项目名称:monodevelop,代码行数:29,代码来源:PythonOptionsWidget.cs
示例15: ImportSymbolSelectionDlg
public ImportSymbolSelectionDlg(INode[] nodes)
{
this.Build ();
SetResponseSensitive(ResponseType.Ok, true);
SetResponseSensitive(ResponseType.Cancel, true);
buttonOk.GrabFocus();
Modal = true;
WindowPosition = Gtk.WindowPosition.CenterOnParent;
// Init name column
var nameCol = new TreeViewColumn();
var textRenderer = new CellRendererText();
nameCol.PackStart(textRenderer, true);
nameCol.AddAttribute(textRenderer, "text", 0);
list.AppendColumn(nameCol);
// Init list model
var nodeStore = new ListStore(typeof(string),typeof(INode));
list.Model = nodeStore;
// Fill list
foreach (var n in nodes)
if(n!=null)
nodeStore.AppendValues(n.ToString(), n);
// Select first result
TreeIter iter;
if(nodeStore.GetIterFirst(out iter))
list.Selection.SelectIter(iter);
}
开发者ID:robik,项目名称:Mono-D,代码行数:32,代码来源:ImportSymbolSelectionDlg.cs
示例16: IncludeNewFilesDialog
public IncludeNewFilesDialog (string title, FilePath baseDirectory)
{
this.Build ();
this.Title = title;
this.baseDirectory = baseDirectory;
treeviewFiles.Model = store;
treeviewFiles.HeadersVisible = false; // Headers are untranslated because they're hidden as default
TreeViewColumn textColumn = new TreeViewColumn ();
CellRendererToggle toggleRender = new CellRendererToggle ();
toggleRender.Toggled += ToggleRenderToggled;
textColumn.PackStart (toggleRender, false);
textColumn.AddAttribute (toggleRender, "active", Columns.IsToggled);
textColumn.Title = "Name";
var pixbufRenderer = new CellRendererImage ();
textColumn.PackStart (pixbufRenderer, false);
textColumn.AddAttribute (pixbufRenderer, "image", Columns.IconOpened);
textColumn.AddAttribute (pixbufRenderer, "image-expander-open", Columns.IconOpened);
textColumn.AddAttribute (pixbufRenderer, "image-expander-closed", Columns.IconClosed);
CellRendererText textRenderer = new CellRendererText ();
textColumn.PackStart (textRenderer, false);
textColumn.AddAttribute (textRenderer, "text", Columns.Text);
treeviewFiles.AppendColumn (textColumn);
buttonExcludeAll.Clicked += ButtonExcludeAllClicked;
buttonIncludeAll.Clicked += ButtonIncludeAllClicked;
buttonOk.Clicked += ButtonOkClicked;
}
开发者ID:Kalnor,项目名称:monodevelop,代码行数:32,代码来源:IncludeNewFilesDialog.cs
示例17: MainWindow
public MainWindow () :
base(Gtk.WindowType.Toplevel)
{
this.Build ();
this.BorderWidth = 12;
this.treeviewNodes.Model = store;
var col =new TreeViewColumn ();
col.Title ="Node";
var pb = new CellRendererPixbuf ();
col.PackStart (pb, false);
col.AddAttribute (pb, "pixbuf", 3);
var text = new CellRendererText ();
col.PackStart (text, true);
col.AddAttribute (text, "text", 0);
this.treeviewNodes.AppendColumn (col);
this.treeviewNodes.AppendColumn ("ResolveResult", new CellRendererText (), "text", 1);
this.treeviewNodes.Selection.Changed += SelectionChanged;
// this.treeviewNodes.HeadersVisible = false;
this.textview1.ModifyFont (Pango.FontDescription.FromString ("Mono 14"));
this.textview1.MoveCursor += HandleMoveCursor;
string path = System.IO.Path.Combine (System.IO.Path.GetDirectoryName (Assembly.GetExecutingAssembly ().Location), "CSharpDemo.cs");
this.textview1.Buffer.Text = File.ReadAllText (path);
buttonParse.Clicked += HandleClicked;
buttonGenerate.Clicked += CSharpGenerateCodeButtonClick;
HandleClicked (this, EventArgs.Empty);
}
开发者ID:artifexor,项目名称:NRefactory,代码行数:28,代码来源:MainWindow.cs
示例18: fillTreeView
public static void fillTreeView()
{
CellRendererText cellRendererText = new CellRendererText ();
for (int i= 0; i<queryResult.ColumNames.Length; i++) {
int column = i;
treeView.AppendColumn (queryResult.ColumNames.GetValue (i).ToString (), cellRendererText,
delegate(TreeViewColumn treeColumn, CellRenderer cell, TreeModel treeModel, TreeIter iter) {
IList row = (IList)treeModel.GetValue (iter, 0);
cellRendererText.Text = row [column].ToString ();
});
}
listStore = new ListStore (typeof(IList));
IEnumerable<IList> values = queryResult.Rows;
foreach (IList k in values) {
listStore.AppendValues (k);
}
treeView.Model = listStore;
}
开发者ID:c-trives,项目名称:ad,代码行数:26,代码来源:TreeViewHelperStatic.cs
示例19: StackTracePad
public StackTracePad()
{
this.ShadowType = ShadowType.In;
store = new TreeStore (typeof (string));
tree = new TreeView (store);
tree.RulesHint = true;
tree.HeadersVisible = true;
TreeViewColumn FrameCol = new TreeViewColumn ();
CellRenderer FrameRenderer = new CellRendererText ();
FrameCol.Title = "Frame";
FrameCol.PackStart (FrameRenderer, true);
FrameCol.AddAttribute (FrameRenderer, "text", 0);
FrameCol.Resizable = true;
FrameCol.Alignment = 0.0f;
tree.AppendColumn (FrameCol);
Add (tree);
ShowAll ();
Runtime.DebuggingService.PausedEvent += (EventHandler) Runtime.DispatchService.GuiDispatch (new EventHandler (OnPausedEvent));
Runtime.DebuggingService.ResumedEvent += (EventHandler) Runtime.DispatchService.GuiDispatch (new EventHandler (OnResumedEvent));
Runtime.DebuggingService.StoppedEvent += (EventHandler) Runtime.DispatchService.GuiDispatch (new EventHandler (OnStoppedEvent));
}
开发者ID:slluis,项目名称:monodevelop-prehistoric,代码行数:26,代码来源:StackTracePad.cs
示例20: DirectoryView
public DirectoryView(ExploreView exploreView)
{
this.exploreView = exploreView;
menu = new DirectoryMenu(exploreView);
store = new Gtk.ListStore(typeof(Gdk.Pixbuf), typeof(string), typeof(string), typeof(string), typeof(string), typeof(string), typeof(ItemType));
Model = store;
sortableColumns = new SortableColumns(this, store);
#if HAVE_ATLEAST_GTK_210
EnableGridLines = TreeViewGridLines.Vertical;
#endif
// setup main column with image/text data
TreeViewColumn column = new TreeViewColumn ();
CellRendererText crt = new CellRendererText();
CellRendererPixbuf crp = new CellRendererPixbuf();
column.Title = "Name";
column.PackStart(crp, false);
column.PackStart(crt, true);
column.AddAttribute(crp, "pixbuf", 0);
column.AddAttribute(crt, "text", 1);
AppendColumn(column);
AppendColumn("Status", ColumnIndex.Status);
AppendColumn("Owner", ColumnIndex.Owner);
AppendColumn("Latest", ColumnIndex.Latest);
Selection.Mode = SelectionMode.Multiple;
KeyReleaseEvent += MyKeyReleaseEventHandler;
ButtonPressEvent += MyButtonPressEventHandler;
}
开发者ID:Jeff-Lewis,项目名称:opentf,代码行数:31,代码来源:DirectoryView.cs
注:本文中的Gtk.CellRendererText类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论