--- title: "How to: Set Tab Stops in Drawn Text" ms.date: "03/30/2017" dev_langs: - "csharp" - "vb" helpviewer_keywords: - "text [Windows Forms], drawing with tab stops" - "tabs [Windows Forms], drawn text" ms.assetid: 64878f98-39ba-4303-b63f-0859ab682eeb --- # How to: Set Tab Stops in Drawn Text You can set tab stops for text by calling the method of a object and then passing that object to the method of the class. > [!NOTE] > The does not support adding tab stops to drawn text, although you can expand existing tab stops using the flag. ## Example The following example sets tab stops at 150, 250, and 350. Then, the code displays a tabbed list of names and test scores. The following illustration shows the tabbed text: ![Screenshot that shows a tabbed list of names and scores.](./media/how-to-set-tab-stops-in-drawn-text/tab-list-names-test-scores.png) The following code passes two arguments to the method. The second argument is an array that contains tab offsets. The first argument passed to is 0, which indicates that the first offset in the array is measured from position 0, the left edge of the bounding rectangle. [!code-csharp[System.Drawing.FontsAndText#41](~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.FontsAndText/CS/Class1.cs#41)] [!code-vb[System.Drawing.FontsAndText#41](~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.FontsAndText/VB/Class1.vb#41)] ## Compiling the Code - The preceding example is designed for use with Windows Forms, and it requires `e`, which is a parameter of . ## See also - [Using Fonts and Text](using-fonts-and-text.md) - [How to: Draw Text with GDI](how-to-draw-text-with-gdi.md)