本文整理汇总了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);
}
示例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;
}
示例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);
}
}
示例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);
}