RemoveByIndex
TabStopCollection.RemoveByIndex method
يزيل علامة التبويب عند الفهرس المحدد من المجموعة.
public void RemoveByIndex(int index)
| معامل | يكتب | وصف |
|---|---|---|
| index | Int32 | فهرس لمجموعة علامات التبويب. |
أمثلة
يوضح كيفية تحديد علامة تبويب في مستند حسب فهرسها وإزالتها.
Document doc = new Document();
TabStopCollection tabStops = doc.FirstSection.Body.Paragraphs[0].ParagraphFormat.TabStops;
tabStops.Add(ConvertUtil.MillimeterToPoint(30), TabAlignment.Left, TabLeader.Dashes);
tabStops.Add(ConvertUtil.MillimeterToPoint(60), TabAlignment.Left, TabLeader.Dashes);
Assert.AreEqual(2, tabStops.Count);
// قم بإزالة علامة التبويب الأولى.
tabStops.RemoveByIndex(0);
Assert.AreEqual(1, tabStops.Count);
doc.Save(ArtifactsDir + "TabStopCollection.RemoveByIndex.docx");
أنظر أيضا
- class TabStopCollection
- مساحة الاسم Aspose.Words
- المجسم Aspose.Words