Visual C++

This is a discussion on Visual C++ within the C++ Programming forums, part of the General Programming Boards category; Can someone tell me how to set tab stops in microsoft visual C++ please I am writing my second program ...

  1. #1
    Registered User
    Join Date
    Apr 2003
    Posts
    5

    Visual C++

    Can someone tell me how to set tab stops in microsoft visual C++ please I am writing my second program for it, and I was wondering if someone might be able to help me?

  2. #2
    Registered User
    Join Date
    Apr 2003
    Posts
    2,662
    Setting Tabs and Indents

    You can indent text with tab characters several ways:

    Use the INDENT SELECTION key.

    Use Auto Indent (without Smart Indent).

    Use Auto Indent (with Smart Indent enabled).

    When you press the TAB key, the insertion point moves to the next indent level. You can display (or hide) the tab symbols by selecting Advanced from the Edit menu, and then selecting View Whitespace.

    You can also use Auto Indent (without Smart Indent) to automatically indent new lines to match the previous line.
    -----------------------
    To set Auto Indent

    From the Tools menu, choose Options.

    Select the Tabs tab.

    Under Auto indent, select the option you want:
    None: to disable Auto Indent

    Default: to set the tab and indent size to match that of the previous level

    Smart: to use Smart Indent
    Click OK.
    If you use Auto Indent (with Smart Indent enabled), the Text editor automatically indents the text based on the context of the previous lines.
    ----------------
    To set Smart Indent

    From the Tools menu, choose Options.


    Select the Tabs tab.


    Under Auto Indent, select Smart.


    Under Smart indent options, select the language element and specify the number of previous lines to use for the context of smart indenting.


    Click OK.
    Backspacing over a tab character deletes that tab character, regardless of the indent setting.

    If you select the Insert spaces option, a tab character is not inserted, and only spaces are inserted to reach the next indent level.

    Note The File type box on the Tabs tab contains a list of file types. The initial tab settings for each file you load are assigned based on the file extension and the setting of this box. You can use the Tab size and Indent size boxes on the Tabs tab or on the Source File Properties page to specify individual settings for these two fields on a per-file basis, as needed.
    -------------------
    To change tab and indent settings

    From the Tools menu, choose Options.


    Select the Tabs tab.


    In the Tab size box, type the number of spaces to use as a tab stop. The default is four spaces.


    In the Indent size box, type the number of spaces to use for indents. The default is four spaces.


    Select the Keep tabs option to treat each tab as a single tab character when the file is saved.
    –or–

    Select the Insert spaces option to use spaces as specified in the Tab size box.

    Click OK.
    To display or hide tab symbols

    From the Edit menu, choose Advanced.


    Select View Whitespace.
    Spaces are displayed as dots and tab symbols are displayed as >> whenever they appear in a source file.

    To indent a group of lines

    Select the group of lines.


    Press the LineIndent key combination.
    To unindent a group of lines

    Select the group of lines.


    Press the LineUnindent key combination.
    Note The LineUnindent command only returns to previous tab stops.
    Last edited by 7stud; 08-04-2003 at 05:32 PM.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. We Got _DEBUG Errors
    By Tonto in forum Windows Programming
    Replies: 5
    Last Post: 12-22-2006, 05:45 PM
  2. C++ std routines
    By siavoshkc in forum C++ Programming
    Replies: 33
    Last Post: 07-28-2006, 01:13 AM
  3. load gif into program
    By willc0de4food in forum Windows Programming
    Replies: 14
    Last Post: 01-11-2006, 10:43 AM
  4. Errors with including winsock 2 lib
    By gamingdl'er in forum C++ Programming
    Replies: 3
    Last Post: 12-05-2005, 08:13 PM
  5. Learning OpenGL
    By HQSneaker in forum C++ Programming
    Replies: 7
    Last Post: 08-06-2004, 09:57 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21