当前位置: 首页>>代码示例>>C#>>正文


C# Gtk.RemoveText方法代码示例

本文整理汇总了C#中Gtk.RemoveText方法的典型用法代码示例。如果您正苦于以下问题:C# Gtk.RemoveText方法的具体用法?C# Gtk.RemoveText怎么用?C# Gtk.RemoveText使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Gtk的用法示例。


在下文中一共展示了Gtk.RemoveText方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: ClearList

    protected void ClearList(Gtk.ComboBox clrComboBox)
    {
        int IterCount = 0;

        Gtk.TreeIter listIter;
        clrComboBox.Model.GetIterFirst(out listIter);
        do
        {
            IterCount++;
        }
        while(clrComboBox.Model.IterNext(ref listIter));

        for(int i=0; i<IterCount; i++) clrComboBox.RemoveText(0);
    }
开发者ID:volgruk,项目名称:GPartimage-ng,代码行数:14,代码来源:MainWindow.cs

示例2: ClearComboBoxEntries

        /// <summary>
        /// Clears the given Gtk.ComboBoxEntry values.
        /// </summary>
        /// <param name="combo">Gtk.ComboBoxEntry</param>
        /// <param name="special">If true, add the Browse_Text to the Gtk.ComboBoxEntry</param>
        /// <history>
        /// [Curtis_Beard]      11/03/2006  Created
        /// </history>
        private void ClearComboBoxEntries(Gtk.ComboBoxEntry combo, bool special)
        {
            for (int i = 0; i < combo.Model.IterNChildren(); i++)
            combo.RemoveText(i);

             combo.Active = -1;
        }
开发者ID:joshball,项目名称:astrogrep,代码行数:15,代码来源:frmMain.cs

示例3: AddComboSelection

        /// <summary>
        /// Add an item to the Gtk.ComboBoxEntry.
        /// </summary>
        /// <param name="combo">Gtk.ComboBoxEntry</param>
        /// <param name="item">string value to add</param>
        private void AddComboSelection(Gtk.ComboBoxEntry combo, string item)
        {
            // remove any old instance
             RemoveComboBoxEntry(combo, item);

             // insert the item at the top
             combo.PrependText(item);

             // set the item to be the active one
             combo.Active = 0;

             // Only store as many paths as has been set in options.
             if (combo.Model.IterNChildren() > Core.GeneralSettings.MaximumMRUPaths)
             {
            // Remove the last item in the list.
            combo.RemoveText(combo.Model.IterNChildren() - 1);
             }
        }
开发者ID:joshball,项目名称:astrogrep,代码行数:23,代码来源:frmMain.cs

示例4: RemoveComboBoxEntry

 /// <summary>
 /// Remove the first entry of the item from the Gtk.ComboBoxEntry.
 /// </summary>
 /// <param name="combo">Gtk.ComboBoxEntry</param>
 /// <param name="item">string value to remove</param>
 private void RemoveComboBoxEntry(Gtk.ComboBoxEntry combo, string item)
 {
     int index = FindComboBoxEntry(combo, item);
      if (index != -1)
     combo.RemoveText(index);
 }
开发者ID:joshball,项目名称:astrogrep,代码行数:11,代码来源:frmMain.cs


注:本文中的Gtk.RemoveText方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。